Code

Moved to trunk/branches/tags structure
[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.3
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,ImageMagick,perl-Crypt-SmbHash
25 %else
26 Requires:               php,php-ldap,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         %define apacheuser wwwrun
35         %define apachegroup root
36         %define webconf /etc/apache2/conf.d/
37 %else
38         %define apacheuser apache 
39         %define apachegroup apache 
40         %define webconf /etc/httpd/conf.d/      
41 %endif
43 %description
44 GOsa is a combination of system-administrator and end-user web
45 interface, designed to handle LDAP based setups.
46 Provided is access to posix, shadow, samba, proxy, fax, and kerberos
47 accounts. It is able to manage the postfix/cyrus server combination
48 and can write user adapted sieve scripts.
50 %package schema
51 Group:                  System/Administration
52 Summary:                Schema Definitions for the GOSA package
53 %if %{suse}
54 Requires:               openldap2 >= 2.0.27
55 %else
56 Requires:               openldap >= 2.0.27
57 %endif
58 Obsoletes:              gosa-ldap
60 %description schema
61 Contains the Schema definition files for the GOSA admin package.
63 %prep
64 %setup -q -n %{sourcename}
65 find . -depth -name CVS -type d | xargs rm -rf
67 %build
69 %install
70 # Create buildroot
71 mkdir -p %{buildroot}/usr/share/gosa
73 DIRS="doc ihtml plugins html include locale"
75 for i in $DIRS; do \
76   cp -ua $i %{buildroot}/usr/share/gosa/$i ; \
77 done
79 mkdir -p %{buildroot}/var/spool/gosa
80 # Copy default config
81 mkdir -p %{buildroot}%{confdir}
82 mkdir -p %{buildroot}%{webconf}
84 cat > %{buildroot}%{webconf}/gosa_include.conf <<EOF
85 # Just to be sure
86 <Directory "/usr/share/gosa/html">
87         Options None
88         AllowOverride None
89         Order allow,deny
90         Allow from all
91 </Directory>
92 # Set alias to gosa
93 Alias /gosa /usr/share/gosa/html
94 EOF
96 mkdir -p %{buildroot}/etc/openldap/schema/gosa
97 mv contrib/openldap/*.schema %{buildroot}/etc/openldap/schema/gosa
98 #rmdir contrib/openldap
100 %clean
101 rm -rf %{buildroot}
103 %files
104 %defattr(-,%{apacheuser},%{apachegroup})
105 %doc %attr(-,root,root) AUTHORS TODO README Changelog COPYING INSTALL FAQ
106 %doc %attr(-,root,root) contrib/gosa.conf contrib/scripts contrib/patches
107 %doc %attr(-,root,root) contrib/fix_config.sh contrib/vacation_example.txt
109 %config(noreplace) %attr(0640,%{apacheuser},%{apachegroup}) %{webconf}/gosa_include.conf
110 %dir %attr(0750, %{apacheuser}, %{apachegroup}) /var/spool/gosa
111 %attr(-, %{apacheuser}, %{apachegroup}) /usr/share/gosa
113 %files schema
114 %defattr(-,root,root)
115 %doc COPYING AUTHORS README contrib/iplanet contrib/demo.ldif contrib/openldap/slapd.conf
116 /etc/openldap/schema/gosa
118 %changelog
119 * Mon Feb 21 2005 Lars Scheiter <lars.scheiter@GONICUS.de> 2.3
120 - Update version to 2.3 (upstream)
122 * Mon Dec 13 2004 Lars Scheiter <lars.scheiter@GONICUS.de> 2.2-2
123 - Optionally allow different sourcenames
125 * Mon Nov 22 2004 Lars Scheiter <lars.scheiter@GONICUS.de> 2.2
126 - Update to 2.2 (upstream)
127 - reintroduction of suse detection
128 - small fixes
129 - Corrected URL
130 - Synchronize schema package name with debian
132 * Mon May 19 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1.1
133 - update to 2.1.1
135 * Mon Apr 19 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1
136 - update to 2.1
138 * Fri Apr 16 2004 Levente Farkas <lfarkas@lfarkas.org> 2.1
139 - minor fixes
140 - update to 2.1rc2
142 * Tue Jan 24 2004 Henning P. Schmiedehausen <hps@intermeta.de> 2.1-2t
143 - bumped to 2.1beta2
144 - first INTERMETA internal build
146 * Mon Oct 20 2003 Lars Scheiter <lars.scheiter@GONICUS.de>
147 - Update to new upstream release (2.0rc1)
149 * Fri Oct 17 2003 Lars Scheiter <lars.scheiter@GONICUS.de>
150 - First build of GOsa as an RPM, should work on SuSE and RedHat