Code

Readded contributed gosa.conf
[gosa.git] / contrib / gosa.spec
1 # Some sort of "detection" of suse
2 %{?suse_version:%define suse 1}
3 %{!?suse_version:%define suse 0}
5 # Define Packagename, e.g.:
6 # rpmbuild --rebuild --define 'sourcename gosa' gosa.srpm
7 %{!?sourcename:%define sourcename %{name}-%{version}}
9 #
10 # Distribution
11 #
12 Summary:                Web Based LDAP Administration Program 
13 Name:                   gosa
14 Version:                2.5.10
15 Release:                1
16 License:                GPL
17 Source:                 ftp://oss.GONICUS.de/pub/gosa/%{sourcename}.tar.bz2
18 URL:                    http://oss.GONICUS.de/project/?group_id=6
19 Group:                  System/Administration
20 Vendor:                 GONICUS GmbH
21 Packager:               Lars Scheiter <lars.scheiter@GONICUS.de>
22 Buildarch:              noarch
23 %if %{suse}
24 Requires:               apache2,apache2-mod_php4,php4,php4-gd,php4-ldap,php4-mcrypt,php4-mysql,php4-imap,php4-iconv,php4-mbstring,php4-gettext,php4-session,ImageMagick
25 %else
26 Requires:               httpd,php,php-ldap,php-imap,php-snmp,php-mysql,php-mbstring,ImageMagick
27 %endif
28 BuildRoot:              %{_tmppath}/%{name}-%{version}-root
29 BuildArch:              noarch
31 %define confdir         /etc/%{name}
33 %if %{suse}
34         %{echo:Building SuSE rpm}
35         %define apacheuser wwwrun
36         %define apachegroup root
37         %define webconf /etc/apache2/conf.d/
38         %define docdir /usr/share/doc/packages/gosa
39 %else
40         %{echo:Building other rpm}
41         %define apacheuser apache 
42         %define apachegroup apache 
43         %define webconf /etc/httpd/conf.d/      
44         %define docdir /usr/share/doc/gosa-%{version}
45 %endif
47 %description
48 GOsa is a combination of system-administrator and end-user web
49 interface, designed to handle LDAP based setups.
50 Provided is access to posix, shadow, samba, proxy, fax, and kerberos
51 accounts. It is able to manage the postfix/cyrus server combination
52 and can write user adapted sieve scripts.
54 %package schema
55 Group:                  System/Administration
56 Summary:                Schema Definitions for the GOSA package
57 %if %{suse}
58 Requires:               openldap2 >= 2.1.22
59 %else
60 Requires:               openldap-servers >= 2.2.0
61 %endif
62 Obsoletes:              gosa-ldap
64 %description schema
65 Contains the Schema definition files for the GOSA admin package.
67 %package mkntpasswd
68 Group:                  System/Administration
69 Summary:                Schema Definitions for the GOSA package
70 %if %{suse}
71 Requires:               perl-Crypt-SmbHash
72 %else
73 Requires:               perl-Crypt-SmbHash >= 0.02
74 %endif
76 %description mkntpasswd
77 Wrapper Script around perl to create Samba Hashes on the fly, added for completeness only.
78 If in doubt use sambas "native" mkntpwd tool to generate hashes for GOsa.
80 %package help-en
81 Group:                  System/Administration
82 Summary:                English online manual for GOSA package
83 Requires:               gosa >= %{version}
85 %description help-en
86 English online manual page for GOSA package
88 %package help-de
89 Group:                  System/Administration
90 Summary:                German localized online manual for GOSA package
91 Requires:               gosa >= %{version}
93 %description help-de
94 German localized online manual page for GOSA package
96 %package help-fr
97 Group:                  System/Administration
98 Summary:                French localized online manual for GOSA package
99 Requires:               gosa >= %{version}
101 %description help-fr
102 French localized online manual page for GOSA package
104 %package help-nl
105 Group:                  System/Administration
106 Summary:                Dutch localized online manual for GOSA package
107 Requires:               gosa >= %{version}
109 %description help-nl
110 Dutch localized online manual page for GOSA package
112 %prep
113 %setup -q -n %{sourcename}
114 find . -depth -name CVS -type d | xargs rm -rf
116 %build
119 %install
120 # Create buildroot
121 mkdir -p %{buildroot}/usr/share/gosa
123 # Copy
124 DIRS="doc ihtml plugins html include locale"
125 for i in $DIRS; do \
126   cp -ua $i %{buildroot}/usr/share/gosa/$i ; \
127 done
128 mkdir %{buildroot}/usr/bin
129 cp bin/mkntpasswd %{buildroot}/usr/bin/
131 # Create files for temporary stuff
132 for i in compile config cache; do \
133   mkdir -p %{buildroot}/var/spool/gosa/$i ; \
134 done
136 # Cleanup manual dirs
137 for i in admin devel; do \
138   rm -rf %{buildroot}/usr/share/gosa/doc/guide/$i ; \
139 done
141 # Remove (some) unneeded files
142 for i in gen_locale.sh gen_online_help.sh gen_function_list.php update.sh; do \
143  rm -rf %{buildroot}/usr/share/gosa/$i ; \
144 done
146 # Cleanup lyx warnings
147 find %{buildroot}/usr/share/gosa -name WARNINGS |xargs rm
150 # Cleanup guide
151 rm -rf %{buildroot}/usr/share/gosa/doc/guide/user/*/lyx-source
154 # Copy default config
155 mkdir -p %{buildroot}%{confdir}
156 mkdir -p %{buildroot}%{webconf}
158 cat > %{buildroot}%{webconf}/gosa_include.conf <<EOF
159 # Just to be sure
160 <Directory "/usr/share/gosa/html">
161         Options None
162         AllowOverride None
163         Order allow,deny
164         Allow from all
165 </Directory>
166 # Set alias to gosa
167 Alias /gosa /usr/share/gosa/html
168 EOF
170 mkdir -p %{buildroot}/etc/openldap/schema/gosa
171 mv contrib/openldap/*.schema %{buildroot}/etc/openldap/schema/gosa
172 sed 's§"CONFIG_TEMPLATE_DIR", "../contrib/"§"CONFIG_TEMPLATE_DIR", "%{docdir}/"§g' %{buildroot}/usr/share/gosa/include/functions.inc > %{buildroot}/usr/share/gosa/include/functions.inc.new
173 mv -f %{buildroot}/usr/share/gosa/include/functions.inc.new %{buildroot}/usr/share/gosa/include/functions.inc
175 mv -f doc manual
176 mkdir -p %{buildroot}/etc/gosa/vacation
177 mv -f %{buildroot}/usr/share/gosa/plugins/personal/mail/sieve-*.txt %{buildroot}/etc/gosa
178 mkdir -p %{buildroot}/usr/share/doc/gosa-%{version}
179 rm -rf %{buildroot}/usr/share/gosa/contrib
180 #rm -rf %{buildroot}/usr/share/gosa/doc
181 #rmdir contrib/openldap
182 bzip2 -9 contrib/opensides/goSamba.pl
184 %clean
185 rm -rf %{buildroot}
187 %post
188 # Add shells file to /etc/gosa 
189 /bin/cp /etc/shells /etc/gosa
191 %pre
192 # Cleanup compile dir on updates, always exit cleanly even on errors
193 [ -d /var/spool/gosa ] && rm -rf /var/spool/gosa/* ; exit 0
195 %postun
196 # Remove temporary files, just to be sure
197 [ -d /var/spool/gosa ] && rm -rf /var/spool/gosa/* ; exit 0
199 %files
200 %defattr(-,%{apacheuser},%{apachegroup})
201 %doc %attr(-,root,root) AUTHORS TODO README README.safemode Changelog COPYING INSTALL FAQ
202 %doc %attr(-,root,root) contrib/altlinux contrib/fix_config.sh contrib/gosa.conf contrib/mysql contrib/opensides
203 %doc %attr(-,root,root) contrib/patches contrib/scripts contrib/vacation_example.txt contrib/demo.ldif contrib/openldap
205 %config(noreplace) %attr(0600,%{apacheuser},%{apachegroup}) %{webconf}/gosa_include.conf
206 %config(noreplace) %attr(0700,%{apacheuser},%{apachegroup}) /etc/gosa
207 %attr(0700, %{apacheuser}, %{apachegroup}) /var/spool/gosa
208 %attr(0744, %{apacheuser}, %{apachegroup}) /usr/share/gosa/html
209 %attr(0744, %{apacheuser}, %{apachegroup}) /usr/share/gosa/ihtml
210 %attr(0744, %{apacheuser}, %{apachegroup}) /usr/share/gosa/include
211 %attr(0744, %{apacheuser}, %{apachegroup}) /usr/share/gosa/locale
212 %attr(0744, %{apacheuser}, %{apachegroup}) /usr/share/gosa/plugins
213 %attr(0744, %{apacheuser}, %{apachegroup}) /usr/share/gosa/doc/guide.xml
215 %files schema
216 %defattr(-,root,root)
217 %doc COPYING AUTHORS README contrib/demo.ldif contrib/openldap
218 /etc/openldap/schema/gosa
220 %files mkntpasswd
221 %defattr(-,root,root)
222 /usr/bin/mkntpasswd
224 %files help-en
225 %defattr(-,root,root)
226 /usr/share/gosa/doc/guide/user/en
228 %files help-de
229 %defattr(-,root,root)
230 /usr/share/gosa/doc/guide/user/de
232 %files help-fr
233 %defattr(-,root,root)
234 /usr/share/gosa/doc/guide/user/fr
236 %files help-nl
237 %defattr(-,root,root)
238 /usr/share/gosa/doc/guide/user/nl
240 %changelog
241 * Wed Apr 11 2007 Lars Scheiter <lars.scheiter@GONICUS.de> 2.5.10
242 - New upstream
243 - Added new subpackage mkntpasswd
244 - Remove perl dependencies off of GOsa main package
246 * Tue Mar 6 2007 Lars Scheiter <lars.scheiter@GONICUS.de> 2.5.9
247 - New upstream
248 - fixed typo in updateprocess
250 * Mon Jan 15 2007 Lars Scheiter <lars.scheiter@GONICUS.de> 2.5.8
251 - New upstream release with security fixes
253 * Wed Dec 20 2006 Lars Scheiter <lars.scheiter@GONICUS.de> 2.5.7
254 - New upstream
255 - %pre and %postun always end successfully now, even on errors
257 * Fri Nov 17 2006 Lars Scheiter <lars.scheiter@GONICUS.de> 2.5.6
258 - New upstream
259 - Cleanup temporary dir after package removal
260 - Cleanup temporary dir before update
262 * Thu Sep 28 2006 Lars Scheiter <lars.scheiter@GONICUS.de> 2.5.4
263 - New upstream version
264 - Downgraded SuSE dependencies to php4
266 * Wed Jun 21 2006 Lars Scheiter <lars.scheiter@GONICUS.de> 2.5.1
267 - New upstream version
269 * Tue May 30 2006 Lars Scheiter <lars.scheiter@GONICUS.de> 2.5
270 - Updated RedHat dependencies
271 - New upstream version
272 - Spelling errors fixed ;)
273 - Seperation of online manual
275 * Mon Dec 19 2005 Lars Scheiter <lars.scheiter@GONICUS.de> 2.4-2
276 - Updated SuSE dependencies to php5
278 * Mon Nov 21 2005 Lars Scheiter <lars.scheiter@GONICUS.de> 2.4
279 - New upstream version
280 - Removed %doc for postgresql and openexchange
282 * Wed Jun 01 2005 Lars Scheiter <lars.scheiter@GONICUS.de> 2.4beta1
283 - New upstream version
284 - Added gosa.conf to contrib dir
285 - Rearranged documentation stuff
286 - Updated dependencies
287 - compress some files
289 * Mon Feb 21 2005 Lars Scheiter <lars.scheiter@GONICUS.de> 2.3
290 - Update version to 2.3 (upstream)
292 * Mon Dec 13 2004 Lars Scheiter <lars.scheiter@GONICUS.de> 2.2-2
293 - Optionally allow different sourcenames
295 * Mon Nov 22 2004 Lars Scheiter <lars.scheiter@GONICUS.de> 2.2
296 - Update to 2.2 (upstream)
297 - reintroduction of suse detection
298 - small fixes
299 - Corrected URL
300 - Synchronize schema package name with debian
302 * Mon May 19 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1.1
303 - update to 2.1.1
305 * Mon Apr 19 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1
306 - update to 2.1
308 * Fri Apr 16 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1
309 - minor fixes
310 - update to 2.1rc2
312 * Tue Jan 24 2004 Henning P. Schmiedehausen <hps@intermeta.de> 2.1-2t
313 - bumped to 2.1beta2
314 - first INTERMETA internal build
316 * Mon Oct 20 2003 Lars Scheiter <lars.scheiter@GONICUS.de>
317 - Update to new upstream release (2.0rc1)
319 * Fri Oct 17 2003 Lars Scheiter <lars.scheiter@GONICUS.de>
320 - First build of GOsa as an RPM, should work on SuSE and RedHat