5
%define _prefix /usr/local
6
%define _datadir %{_prefix}/share
9
%define do_build_docs 1
10
%{?with-docs: %define do_build_docs 1}
11
%{?without-docs: %define do_build_docs 0}
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"` }
17
Summary: sTeam - structuring information in a team
18
Vendor: University of Paderborn
20
Packager: Robert Hinn <exodus@uni-paderborn.de>
21
URL: http://www.open-steam.org
25
Group: Applications/Productivity
27
Source0: %{name}-%{version}.tar.gz
29
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
34
Requires: mysql, mysql-server
35
Requires: libxml2, libxslt
36
Requires: libpng, libjpeg
38
BuildRequires: autoconf >= 2.52
39
BuildRequires: mysql-devel
40
BuildRequires: libxml2-devel, libxslt-devel
41
BuildRequires: libpng-devel, libjpeg-devel
43
BuildRequires: graphviz
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.
55
Summary: Developer documentation for %{name}.
57
#Requires: %{name} = %{version}
60
Developer documentation for %{name}.
68
export CFLAGS="${CFLAGS:-%optflags}"
69
export CXXFLAGS="${CXXFLAGS:-%optflags}"
73
--build=%{_target_platform} \
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:
84
# Generate documentation:
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).
96
install -D -m755 redhat/init.d/steam %{buildroot}%{_sysconfdir}/init.d/steam
100
[ -z "%{buildroot}" -o "%{buildroot}" = "/" ] || rm -rf %{buildroot}
103
# The following script will be run before installing:
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
119
# The following script will be run before uninstalling:
121
# Unregister sTeam service
122
chkconfig --del steam
124
# The following script will be run after uninstalling:
125
%postun -p /sbin/ldconfig
128
/sbin/install-info --delete --info-dir=%{_infodir} %{name}
130
# The "if" condition is necessary to prevent the script from being
131
# run during an update.
133
# The following script will be run on verify:
138
%defattr(-,root,root)
139
%doc README.1st COPYING
140
# Just add everything:
142
%{_sysconfdir}/init.d/steam
143
## Configuration files:
144
%config(noreplace,missingok) %{_prefix}/lib/steam/config/*
146
#%{_libdir}/lib*.so.*
149
#%{_datadir}/locale/*/LC_MESSAGES/*
155
%defattr(-,root,root)
157
## Mark directory as documentation directory:
158
#%docdir /usr/lib/%{name}/doc