~ubuntu-branches/ubuntu/hardy/steam/hardy

« back to all changes in this revision

Viewing changes to redhat/steam.spec

  • Committer: Bazaar Package Importer
  • Author(s): Alain Schroeder
  • Date: 2006-11-21 16:03:12 UTC
  • mfrom: (2.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061121160312-nf96y6nihzsyd2uv
Tags: 2.2.31-3
Add patch to prevent inconsistent data after shutdown.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Name: steam
2
 
Version: 1.6.0
3
 
Release: 1
4
 
 
5
 
%define _prefix /usr/local
6
 
%define _datadir %{_prefix}/share
7
 
 
8
 
# build documentation?
9
 
%define do_build_docs 1
10
 
%{?with-docs: %define do_build_docs 1}
11
 
%{?without-docs: %define do_build_docs 0}
12
 
 
13
 
# You can use the %{version_underscore} var if you need the version number
14
 
# with dots converted to underscores, e.g.: 1_6_0
15
 
%{expand: %%define version_underscore `echo %%{version} | sed -e "s/\\./_/g"` }
16
 
 
17
 
Summary: sTeam - structuring information in a team
18
 
Vendor: University of Paderborn
19
 
#Distribution:
20
 
Packager: Robert Hinn <exodus@uni-paderborn.de>
21
 
URL: http://www.open-steam.org
22
 
License: GPL
23
 
#Copyright: GPL
24
 
 
25
 
Group: Applications/Productivity
26
 
 
27
 
Source0:        %{name}-%{version}.tar.gz
28
 
 
29
 
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-buildroot
30
 
 
31
 
Prefix: %{_prefix}
32
 
 
33
 
Requires: pike
34
 
Requires: mysql, mysql-server
35
 
Requires: libxml2, libxslt
36
 
Requires: libpng, libjpeg
37
 
BuildRequires: pike
38
 
BuildRequires: autoconf >= 2.52
39
 
BuildRequires: mysql-devel
40
 
BuildRequires: libxml2-devel, libxslt-devel
41
 
BuildRequires: libpng-devel, libjpeg-devel
42
 
%if %{do_build_docs}
43
 
BuildRequires: graphviz
44
 
%endif
45
 
 
46
 
%description
47
 
sTeam is a client-server system providing a virtual learning/working environment.
48
 
The system consists of interconnected rooms, which contain different objects.
49
 
Objects can be users, documents or any type of references. Connections between
50
 
the objects allow users to structure the content according to their needs.
51
 
 
52
 
 
53
 
%if %{do_build_docs}
54
 
%package doc
55
 
Summary: Developer documentation for %{name}.
56
 
Group: Documentation
57
 
#Requires: %{name} = %{version}
58
 
 
59
 
%description doc
60
 
Developer documentation for %{name}.
61
 
%endif
62
 
 
63
 
%prep
64
 
%setup -q
65
 
 
66
 
 
67
 
%build
68
 
export CFLAGS="${CFLAGS:-%optflags}"
69
 
export CXXFLAGS="${CXXFLAGS:-%optflags}"
70
 
aclocal
71
 
#./configure \
72
 
./build \
73
 
        --build=%{_target_platform} \
74
 
        --prefix=%{_prefix} \
75
 
        --mandir=%{_mandir} \
76
 
        --infodir=%{_infodir} \
77
 
        --datadir=%{_datadir} \
78
 
        --sysconfdir=%{_sysconfdir} \
79
 
        --with-installdir=%{buildroot} \
80
 
        --with-realdir=/lib/steam
81
 
# Make is already called by the ./build script:
82
 
#make
83
 
chmod u+xr setup
84
 
# Generate documentation:
85
 
%if %{do_build_docs}
86
 
pike doxygen.pike
87
 
%endif
88
 
 
89
 
 
90
 
%install
91
 
[ -z "%{buildroot}" -o "%{buildroot}" = "/" ] || rm -rf %{buildroot}
92
 
# Don't run ./install, it runs ./setup and that must be run on the target machine
93
 
# (in the post-install section).
94
 
#./install
95
 
make install
96
 
install -D -m755 redhat/init.d/steam %{buildroot}%{_sysconfdir}/init.d/steam
97
 
 
98
 
 
99
 
%clean
100
 
[ -z "%{buildroot}" -o "%{buildroot}" = "/" ] || rm -rf %{buildroot}
101
 
 
102
 
 
103
 
# The following script will be run before installing:
104
 
%pre
105
 
 
106
 
 
107
 
# The following script will be run after installing (a single command
108
 
# may be specified by the -p option):
109
 
%post -p /sbin/ldconfig
110
 
/sbin/install-info --info-dir=%{_infodir} %{_infodir}/%{name}.info
111
 
# Setup the sTeam server:
112
 
echo "The MySQL database must be running, I'm trying to start it..."
113
 
/sbin/service mysqld start
114
 
cd %{_prefix}%{realdir}/config && pike ../tools/create_cert.pike
115
 
cd %{_prefix}%{realdir} && pike bin/setup
116
 
# Add sTeam server as a service:
117
 
chkconfig --add steam
118
 
 
119
 
# The following script will be run before uninstalling:
120
 
%preun
121
 
# Unregister sTeam service
122
 
chkconfig --del steam
123
 
 
124
 
# The following script will be run after uninstalling:
125
 
%postun -p /sbin/ldconfig
126
 
if [ "$1" = "0" ]
127
 
then
128
 
        /sbin/install-info --delete --info-dir=%{_infodir} %{name}
129
 
fi
130
 
# The "if" condition is necessary to prevent the script from being
131
 
# run during an update.
132
 
 
133
 
# The following script will be run on verify:
134
 
#%verifyscript
135
 
 
136
 
 
137
 
%files
138
 
%defattr(-,root,root)
139
 
%doc README.1st COPYING
140
 
# Just add everything:
141
 
%{_prefix}/lib/steam
142
 
%{_sysconfdir}/init.d/steam
143
 
## Configuration files:
144
 
%config(noreplace,missingok) %{_prefix}/lib/steam/config/*
145
 
#%{_bindir}/*
146
 
#%{_libdir}/lib*.so.*
147
 
#%{_libdir}/lib*.so
148
 
#%{_mandir}/man?/*
149
 
#%{_datadir}/locale/*/LC_MESSAGES/*
150
 
#%{_infodir}/*.info*
151
 
#%{_datadir}/aclocal
152
 
 
153
 
%if %{do_build_docs}
154
 
%files doc
155
 
%defattr(-,root,root)
156
 
%doc docs
157
 
## Mark directory as documentation directory:
158
 
#%docdir /usr/lib/%{name}/doc
159
 
%endif
160