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

« back to all changes in this revision

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