summaryrefslogtreecommitdiffstats
path: root/gosa.spec
blob: 3c96028c26605621df3f4388221e22d6e5fac05b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
%global confdir  %{_sysconfdir}/%{name}
%global apacheuser apache 
%global apachegroup apache 
%global webconf %{_sysconfdir}/httpd/conf.d/ 


Summary:   Web Based LDAP Administration Program 
Name:      gosa
Version:   2.6.10
Release:   1%{?dist}
License:   GPLv2

URL:       https://oss.GONICUS.de/labs/gosa/
Source0:   http://oss.gonicus.de/pub/gosa/%{name}-core-%{version}.tar.bz2
Group:     Applications/System

Patch0:    01_fix_template_location.patch
Patch1:    02_fix_class_mapping.patch
Patch2:    03_fix_locale_location.patch
Patch3:    04_fix_online_help_location.patch

Buildarch: noarch
Requires:  php >= 5.2.0
Requires:  php-ldap php-imap php-snmp php-mysql php-mbstring
Requires:  ImageMagick
Requires:  perl(Crypt::SmbHash)

BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)


%description
GOsa is a combination of system-administrator and end-user web
interface, designed to handle LDAP based setups.
Provided is access to posix, shadow, samba, proxy, fax, and kerberos
accounts. It is able to manage the postfix/cyrus server combination
and can write user adapted sieve scripts.

%description -l fr
GOsa est un ensemble d'outils WEB pour administrateurs système et
utilisateurs finaux permettant de gérer des configurations basées sur
un annuaire LDAP.
GOsa permet de gérer des comptes de type Posix, Shadow, Samba, Proxy,
Fax et Kerberos.
Il est également possible de gérer des serveurs Postfix/Cyrus et 
de produire des scripts bases sur Sieve.


%package devel
Summary:   GOsa development utiles
Group:     Applications/System
Requires:  php-cli,latex2html,lyx

%description devel
This package contains a couple of tools to generate
online help, extract localizations, and aid developing.


%package desktop
Summary:   Desktop integration for GOsa
Group:     Applications/System
BuildRequires:  desktop-file-utils
Requires:  firefox

%description desktop
This package includes a menu definition for your
desktop environment.


%package schema
Summary:   Schema Definitions for the GOSA package
Group:     Applications/System
Requires:  openldap-servers 

%description schema
Contains the Schema definition files for the GOSA admin package.


%package help-en
Summary:   English online manual for GOSA package
Group:     Applications/System
Requires:  gosa = %{version}-%{release}

%description help-en
English online manual page for GOSA package


%package help-de
Summary:   German localized online manual for GOSA package
Group:     Applications/System
Requires:  gosa = %{version}-%{release}

%description help-de
German localized online manual page for GOSA package


%package help-fr
Summary:   French localized online manual for GOSA package
Group:     Applications/System
Requires:  gosa = %{version}-%{release}

%description help-fr
French localized online manual page for GOSA package


%package help-nl
Summary:   Dutch localized online manual for GOSA package
Group:     Applications/System
Requires:  gosa = %{version}-%{release}

%description help-nl
Dutch localized online manual page for GOSA package


%package help-es
Summary:   Spain localized online manual for GOSA package
Group:     Applications/System
Requires:  gosa = %{version}-%{release}

%description help-es
Spain localized online manual page for GOSA package


%prep
%setup -q -n %{name}-core-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1


%build
# nothing to build


%install
# Create buildroot
mkdir -p %{buildroot}%{_datadir}/gosa

# Create files for temporary stuff
for i in compile config cache; do
  mkdir -p %{buildroot}/var/spool/gosa/$i
done
mkdir -p %{buildroot}/var/cache/gosa

# Copy
DIRS="doc ihtml plugins html include locale setup"
for i in $DIRS; do \
  cp -a $i %{buildroot}%{_datadir}/gosa/$i ; \
done

# Copy files for gosa
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{confdir}
mkdir -p %{buildroot}%{webconf}

touch %{buildroot}%{confdir}/gosa.secrets
install -p -m 755 update-gosa                 %{buildroot}%{_sbindir}
install -p -m 755 bin/gosa-encrypt-passwords  %{buildroot}%{_sbindir}
install -p -m 755 bin/mkntpasswd              %{buildroot}%{_sbindir}
install -p -m 644 debian/gosa-apache.conf     %{buildroot}%{webconf}
install -p -m 644 contrib/shells              %{buildroot}%{confdir}
install -p -m 644 contrib/encodings           %{buildroot}%{confdir}

# Cleanup manual dirs
for i in admin ; do \
  rm -rf %{buildroot}%{_datadir}/gosa/doc/$i ; \
done

# Remove (some) unneeded files
for i in gen_locale.sh gen_online_help.sh gen_function_list.php update.sh; do \
 rm -rf %{buildroot}%{_datadir}/gosa/$i ; \
done

# Cleanup lyx warnings
find %{buildroot}%{_datadir}/gosa -name WARNINGS |xargs rm

# Cleanup guide
rm -rf %{buildroot}%{_datadir}/gosa/doc/guide/user/*/lyx-source

# Copy default config
mkdir -p %{buildroot}%{confdir}
mkdir -p %{buildroot}%{webconf}

# Copy file for gosa-schema
mkdir -p %{buildroot}%{_sysconfdir}/openldap/schema/gosa

install -p contrib/openldap/*.schema %{buildroot}%{_sysconfdir}/openldap/schema/gosa

# Copy files for gosa-devel
mkdir -p %{buildroot}%{_bindir}
install -p update-locale %{buildroot}%{_bindir}
install -p update-online-help %{buildroot}%{_bindir}
install -p update-pdf-help %{buildroot}%{_bindir}
install -p dh-make-gosa %{buildroot}%{_bindir}

# Copy files for desktop
mkdir -p %{buildroot}%{confdir}
mkdir -p %{buildroot}%{_sbindir}
mkdir -p %{buildroot}%{_datadir}/pixmaps
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_mandir}/man1/
mkdir -p %{buildroot}%{_mandir}/man5/

install -p -m 644 contrib/desktoprc  %{buildroot}%{confdir}
install -p -m 755 contrib/gosa       %{buildroot}%{_bindir}
install -p -m 644 debian/gosa.xpm    %{buildroot}%{_datadir}/pixmaps
install -p -m 644 debian/gosa-16.xpm %{buildroot}%{_datadir}/pixmaps
desktop-file-install \
    --dir=%{buildroot}%{_datadir}/applications \
    debian/gosa-desktop.desktop 

# Copy manpages
for x in update-gosa.1 dh-make-gosa.1 update-locale.1 update-online-help.1 update-pdf-help.1 gosa-encrypt-passwords.1 contrib/gosa.1
do
   install -p -m 644  $x %{buildroot}%{_mandir}/man1/
done
install -p -m 644 contrib/gosa.conf.5 %{buildroot}%{_mandir}/man5/


%clean
rm -rf %{buildroot}


%pre
# Cleanup compile dir on updates, always exit cleanly even on errors
[ -d /var/spool/gosa ] && rm -rf /var/spool/gosa/* ; exit 0


%post
%{_sbindir}/update-gosa


%post desktop
update-desktop-database &> /dev/null || :


%postun desktop 
update-desktop-database &> /dev/null || :


%files
%defattr(-,root,root,-)
%doc AUTHORS README README.safemode Changelog COPYING INSTALL FAQ CODING
%doc contrib/gosa.conf contrib/openldap/slapd.conf
%dir %{confdir}
%config(noreplace) %{confdir}/gosa.secrets
%config(noreplace) %{confdir}/shells
%config(noreplace) %{confdir}/encodings
%config(noreplace) %{webconf}/gosa-apache.conf
%{_sbindir}/update-gosa
%{_sbindir}/gosa-encrypt-passwords
%{_sbindir}/mkntpasswd
%{_mandir}/man1/update-gosa.1*
%{_mandir}/man1/gosa-encrypt-passwords.1*
%{_mandir}/man5/gosa.conf.5*
%attr(0700,%{apacheuser},%{apachegroup}) /var/spool/gosa
%dir %{_datadir}/gosa
%{_datadir}/gosa/html
%{_datadir}/gosa/ihtml
%{_datadir}/gosa/include
%{_datadir}/gosa/locale
%{_datadir}/gosa/plugins
%{_datadir}/gosa/setup
%dir %{_datadir}/gosa/doc
%dir %{_datadir}/gosa/doc/core
%exclude %{_datadir}/gosa/doc/guide.xml
%{_datadir}/gosa/doc/core/guide.xml
/var/cache/gosa

########################

%files devel
%defattr(-,root,root)
%{_bindir}/dh-make-gosa
%{_bindir}/update-locale
%{_bindir}/update-online-help
%{_bindir}/update-pdf-help
%{_mandir}/man1/dh-make-gosa.1*
%{_mandir}/man1/update-locale.1*
%{_mandir}/man1/update-online-help.1*
%{_mandir}/man1/update-pdf-help.1*

########################

%files desktop
%defattr(-,root,root)
%dir %{confdir}
%config(noreplace) %{confdir}/desktoprc
%{_bindir}/gosa
%{_datadir}/pixmaps/gosa*
%{_datadir}/applications/gosa*
%{_mandir}/man1/gosa.1*

########################

%files schema
%defattr(-,root,root)
%doc COPYING AUTHORS README contrib/openldap
%{_sysconfdir}/openldap/schema/gosa

########################

%files help-en
%defattr(-,root,root)
%{_datadir}/gosa/doc/core/en
#%{_datadir}/gosa/doc/plugins/*/en

########################

%files help-de
%defattr(-,root,root)
%{_datadir}/gosa/doc/core/de
#%{_datadir}/gosa/doc/plugins/*/de

########################

%files help-fr
%defattr(-,root,root)
%{_datadir}/gosa/doc/core/fr
#%{_datadir}/gosa/doc/plugins/*/fr

########################

%files help-nl
%defattr(-,root,root)
%{_datadir}/gosa/doc/core/nl
#%{_datadir}/gosa/doc/plugins/*/nl

########################

%files help-es
%defattr(-,root,root)
%{_datadir}/gosa/doc/core/es
#%{_datadir}/gosa/doc/plugins/*/es

########################

%changelog
* Sat May 23 2010 Remi Collet <Fedora@FamilleCollet.com> - 2.6.10-1
- work on fedora spec

* Thu May 14 2010 Olivier BONHOMME <obonhomme@nerim.net>
- Corrected errors when building RPM and plugins where not on right
  place Closes #957 and #970

* Fri Nov 17 2008 Stefan Japes <japes@GONICUS.de>
- First build of GOsa 2.6 as an RPM, should work on SuSE and RedHat