5
%define _prefix /usr/local
7
%define _datadir %{_prefix}/share
8
%define steamdir %{_prefix}/lib/%{brand}
9
%define configdir %{_sysconfdir}/%{brand}
10
%define logdir /var/log/%{brand}
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}
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"` }
21
Summary: sTeam - structuring information in a team
22
Vendor: University of Paderborn
24
Packager: Robert Hinn <exodus@uni-paderborn.de>
25
URL: http://www.open-steam.org
29
Group: Applications/Productivity
31
Source0: %{name}-%{version}.tar.bz2
33
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
38
Requires: mysql, mysql-server
39
Requires: libxml2, libxslt
40
Requires: libpng, libjpeg
42
BuildRequires: autoconf >= 2.52
43
BuildRequires: mysql-devel
44
BuildRequires: libxml2-devel, libxslt-devel
45
BuildRequires: libpng-devel, libjpeg-devel
47
BuildRequires: graphviz
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.
59
Summary: Developer documentation for %{name}.
61
#Requires: %{name} = %{version}
64
Developer documentation for %{name}.
72
export CFLAGS="${CFLAGS:-%optflags}"
73
export CXXFLAGS="${CXXFLAGS:-%optflags}"
77
--build=%{_target_platform} \
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:
91
# Generate documentation:
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).
103
install -D -m755 redhat/init.d/steam %{buildroot}%{_sysconfdir}/init.d/steam
107
[ -z "%{buildroot}" -o "%{buildroot}" = "/" ] || rm -rf %{buildroot}
110
# The following script will be run before installing:
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}
126
# The following script will be run before uninstalling:
128
# Unregister sTeam service
129
chkconfig --del %{brand}
131
# The following script will be run after uninstalling:
132
%postun -p /sbin/ldconfig
135
/sbin/install-info --delete --info-dir=%{_infodir} %{name}
137
# The "if" condition is necessary to prevent the script from being
138
# run during an update.
140
# The following script will be run on verify:
145
%defattr(-,root,root)
146
%doc README.1st COPYING
147
# Just add everything:
148
%{_sysconfdir}/init.d/%{brand}
151
## Configuration files:
152
%config(noreplace,missingok) %{configdir}/*
154
#%{_libdir}/lib*.so.*
157
#%{_datadir}/locale/*/LC_MESSAGES/*
163
%defattr(-,root,root)
165
## Mark directory as documentation directory:
166
#%docdir /usr/lib/%{name}/doc