Code

Removed iPlanet dependency
[gosa.git] / contrib / gosa.spec
1 # Some sort auf "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.4beta1
15 Release:                1
16 License:                GPL
17 Source:                 ftp://oss.GONICUS.de/pub/gosa/beta/%{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,php4,php4-gd,php4-ldap,php4-mcrypt,php4-imap,php4-iconv,ImageMagick,perl-Crypt-SmbHash
25 %else
26 Requires:               httpd,php,php-ldap,php-imap,perl-Crypt-SmbHash >= 0.02,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.2.6
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.
68 %prep
69 %setup -q -n %{sourcename}
70 find . -depth -name CVS -type d | xargs rm -rf
72 %build
75 %install
76 # Create buildroot
77 mkdir -p %{buildroot}/usr/share/gosa
79 DIRS="doc ihtml plugins html include locale"
81 for i in $DIRS; do \
82   cp -ua $i %{buildroot}/usr/share/gosa/$i ; \
83 done
85 mkdir -p %{buildroot}/var/spool/gosa
86 # Copy default config
87 mkdir -p %{buildroot}%{confdir}
88 mkdir -p %{buildroot}%{webconf}
90 cat > %{buildroot}%{webconf}/gosa_include.conf <<EOF
91 # Just to be sure
92 <Directory "/usr/share/gosa/html">
93         Options None
94         AllowOverride None
95         Order allow,deny
96         Allow from all
97 </Directory>
98 # Set alias to gosa
99 Alias /gosa /usr/share/gosa/html
100 EOF
102 mkdir -p %{buildroot}/etc/openldap/schema/gosa
103 mv contrib/openldap/*.schema %{buildroot}/etc/openldap/schema/gosa
104 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
105 mv -f %{buildroot}/usr/share/gosa/include/functions.inc.new %{buildroot}/usr/share/gosa/include/functions.inc
106 mv -f doc manual
107 mkdir -p %{buildroot}/etc/gosa/vacation
108 mv plugins/personal/mail/sieve-*.txt %{buildroot}/etc/gosa
109 mkdir -p %{buildroot}/usr/share/doc/gosa-%{version}
110 rm -rf %{buildroot}/usr/share/gosa/contrib
111 rm -rf %{buildroot}/usr/share/gosa/doc
112 #rmdir contrib/openldap
113 bzip2 -9 contrib/opensides/goSamba.pl
115 %clean
116 rm -rf %{buildroot}
118 %post
119 # Add shells file to /etc/gosa 
120 /bin/cp /etc/shells /etc/gosa
122 %files
123 %defattr(-,%{apacheuser},%{apachegroup})
124 %doc %attr(-,root,root) AUTHORS TODO README manual/README.openxchange README.safemode Changelog COPYING INSTALL FAQ
125 %doc %attr(-,root,root) manual 
126 %doc %attr(-,root,root) contrib/altlinux contrib/fix_config.sh contrib/gosa.conf contrib/mysql contrib/opensides
127 %doc %attr(-,root,root) contrib/patches contrib/postgresql contrib/scripts contrib/vacation_example.txt
129 %config(noreplace) %attr(0600,%{apacheuser},%{apachegroup}) %{webconf}/gosa_include.conf
130 %config(noreplace) %attr(0700,%{apacheuser},%{apachegroup}) /etc/gosa
131 %dir %attr(0700, %{apacheuser}, %{apachegroup}) /var/spool/gosa
132 %attr(0744, %{apacheuser}, %{apachegroup}) /usr/share/gosa
134 %files schema
135 %defattr(-,root,root)
136 %doc COPYING AUTHORS README contrib/demo.ldif contrib/openldap
137 /etc/openldap/schema/gosa
139 %changelog
140 * Wed Jun 01 2005 Lars Scheiter <lars.scheiter@GONICUS.de> 2.4beta1
141 - New upstream version
142 - Added gosa.conf to contrib dir
143 - Rearranged documentation stuff
144 - Updated dependencies
145 - compress some files
147 * Mon Feb 21 2005 Lars Scheiter <lars.scheiter@GONICUS.de> 2.3
148 - Update version to 2.3 (upstream)
150 * Mon Dec 13 2004 Lars Scheiter <lars.scheiter@GONICUS.de> 2.2-2
151 - Optionally allow different sourcenames
153 * Mon Nov 22 2004 Lars Scheiter <lars.scheiter@GONICUS.de> 2.2
154 - Update to 2.2 (upstream)
155 - reintroduction of suse detection
156 - small fixes
157 - Corrected URL
158 - Synchronize schema package name with debian
160 * Mon May 19 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1.1
161 - update to 2.1.1
163 * Mon Apr 19 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1
164 - update to 2.1
166 * Fri Apr 16 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1
167 - minor fixes
168 - update to 2.1rc2
170 * Tue Jan 24 2004 Henning P. Schmiedehausen <hps@intermeta.de> 2.1-2t
171 - bumped to 2.1beta2
172 - first INTERMETA internal build
174 * Mon Oct 20 2003 Lars Scheiter <lars.scheiter@GONICUS.de>
175 - Update to new upstream release (2.0rc1)
177 * Fri Oct 17 2003 Lars Scheiter <lars.scheiter@GONICUS.de>
178 - First build of GOsa as an RPM, should work on SuSE and RedHat