Code

Updated spec file data
[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 %else
39         %{echo:Building other rpm}
40         %define apacheuser apache 
41         %define apachegroup apache 
42         %define webconf /etc/httpd/conf.d/      
43 %endif
45 %description
46 GOsa is a combination of system-administrator and end-user web
47 interface, designed to handle LDAP based setups.
48 Provided is access to posix, shadow, samba, proxy, fax, and kerberos
49 accounts. It is able to manage the postfix/cyrus server combination
50 and can write user adapted sieve scripts.
52 %package schema
53 Group:                  System/Administration
54 Summary:                Schema Definitions for the GOSA package
55 %if %{suse}
56 Requires:               openldap2 >= 2.2.6
57 %else
58 Requires:               openldap-servers >= 2.2.0
59 %endif
60 Obsoletes:              gosa-ldap
62 %description schema
63 Contains the Schema definition files for the GOSA admin package.
66 %prep
67 %setup -q -n %{sourcename}
68 find . -depth -name CVS -type d | xargs rm -rf
70 %build
73 %install
74 # Create buildroot
75 mkdir -p %{buildroot}/usr/share/gosa
77 DIRS="doc ihtml plugins html include locale"
79 for i in $DIRS; do \
80   cp -ua $i %{buildroot}/usr/share/gosa/$i ; \
81 done
83 mkdir -p %{buildroot}/var/spool/gosa
84 # Copy default config
85 mkdir -p %{buildroot}%{confdir}
86 mkdir -p %{buildroot}%{webconf}
88 cat > %{buildroot}%{webconf}/gosa_include.conf <<EOF
89 # Just to be sure
90 <Directory "/usr/share/gosa/html">
91         Options None
92         AllowOverride None
93         Order allow,deny
94         Allow from all
95 </Directory>
96 # Set alias to gosa
97 Alias /gosa /usr/share/gosa/html
98 EOF
100 mkdir -p %{buildroot}/etc/openldap/schema/gosa
101 mv contrib/openldap/*.schema %{buildroot}/etc/openldap/schema/gosa
102 sed 's§"CONFIG_TEMPLATE_DIR", "../contrib/"§"CONFIG_TEMPLATE_DIR", "/usr/share/doc/gosa-%{version}/"§g' %{buildroot}/usr/share/gosa/include/functions.inc > %{buildroot}/usr/share/gosa/include/functions.inc.new
103 mv -f %{buildroot}/usr/share/gosa/include/functions.inc.new %{buildroot}/usr/share/gosa/include/functions.inc
104 mv -f doc manual
105 mkdir -p %{buildroot}/etc/gosa/vacation
106 mv plugins/personal/mail/sieve-*.txt %{buildroot}/etc/gosa
107 mkdir -p %{buildroot}/usr/share/doc/gosa-%{version}
108 rm -rf %{buildroot}/usr/share/gosa/contrib
109 rm -rf %{buildroot}/usr/share/gosa/doc
110 #rmdir contrib/openldap
111 bzip2 -9 contrib/opensides/goSamba.pl
113 %clean
114 rm -rf %{buildroot}
116 %post
117 # Add shells file to /etc/gosa 
118 /bin/cp /etc/shells /etc/gosa
120 %files
121 %defattr(-,%{apacheuser},%{apachegroup})
122 %doc %attr(-,root,root) AUTHORS TODO README manual/README.openxchange README.safemode Changelog COPYING INSTALL FAQ
123 %doc %attr(-,root,root) manual 
124 %doc %attr(-,root,root) contrib/altlinux contrib/fix_config.sh contrib/gosa.conf contrib/mysql contrib/opensides
125 %doc %attr(-,root,root) contrib/patches contrib/postgresql contrib/scripts contrib/vacation_example.txt
127 %config(noreplace) %attr(0600,%{apacheuser},%{apachegroup}) %{webconf}/gosa_include.conf
128 %config(noreplace) %attr(0700,%{apacheuser},%{apachegroup}) /etc/gosa
129 %dir %attr(0700, %{apacheuser}, %{apachegroup}) /var/spool/gosa
130 %attr(0744, %{apacheuser}, %{apachegroup}) /usr/share/gosa
132 %files schema
133 %defattr(-,root,root)
134 %doc COPYING AUTHORS README contrib/iplanet contrib/demo.ldif contrib/openldap
135 /etc/openldap/schema/gosa
137 %changelog
138 * Wed Jun 01 2005 Lars Scheiter <lars.scheiter@GONICUS.de> 2.4beta1
139 - New upstream version
140 - Added gosa.conf to contrib dir
141 - Rearranged documentation stuff
142 - Updated dependencies
143 - compress some files
145 * Mon Feb 21 2005 Lars Scheiter <lars.scheiter@GONICUS.de> 2.3
146 - Update version to 2.3 (upstream)
148 * Mon Dec 13 2004 Lars Scheiter <lars.scheiter@GONICUS.de> 2.2-2
149 - Optionally allow different sourcenames
151 * Mon Nov 22 2004 Lars Scheiter <lars.scheiter@GONICUS.de> 2.2
152 - Update to 2.2 (upstream)
153 - reintroduction of suse detection
154 - small fixes
155 - Corrected URL
156 - Synchronize schema package name with debian
158 * Mon May 19 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1.1
159 - update to 2.1.1
161 * Mon Apr 19 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1
162 - update to 2.1
164 * Fri Apr 16 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1
165 - minor fixes
166 - update to 2.1rc2
168 * Tue Jan 24 2004 Henning P. Schmiedehausen <hps@intermeta.de> 2.1-2t
169 - bumped to 2.1beta2
170 - first INTERMETA internal build
172 * Mon Oct 20 2003 Lars Scheiter <lars.scheiter@GONICUS.de>
173 - Update to new upstream release (2.0rc1)
175 * Fri Oct 17 2003 Lars Scheiter <lars.scheiter@GONICUS.de>
176 - First build of GOsa as an RPM, should work on SuSE and RedHat