]>
Commit | Line | Data |
---|---|---|
e5d21738 ER |
1 | # TODO |
2 | # - ldap schema package: docs/schema/dhcp.schema | |
180c8461 ER |
3 | # - system fpdf |
4 | # - system seclib | |
90fc17b0 ER |
5 | %include /usr/lib/rpm/macros.perl |
6 | Summary: Administration of LDAP users, groups and hosts via Web GUI | |
7 | Summary(de.UTF-8): Administration von Benutzern, Gruppen und Hosts für LDAP-Server | |
b294cfa5 | 8 | Summary(pl.UTF-8): LDAP Account Manager (LAM) - interfejs WWW do zarządzania kontami na serwerze LDAP |
50edd543 | 9 | Name: ldap-account-manager |
b4d1cae5 | 10 | Version: 3.9 |
697d3c1b | 11 | Release: 2 |
90fc17b0 ER |
12 | License: GPL v2+ |
13 | Group: Applications/WWW | |
180c8461 | 14 | Source0: http://downloads.sourceforge.net/lam/%{name}-%{version}.tar.gz |
b4d1cae5 | 15 | # Source0-md5: 44f33cfd2a900ad9739692a7f4844f51 |
90fc17b0 ER |
16 | Source1: apache.conf |
17 | Source2: lighttpd.conf | |
dbc2f997 | 18 | URL: http://lam.sourceforge.net/ |
a0f144c6 ER |
19 | Patch0: configdir.patch |
20 | Patch1: loginbysearch.patch | |
8a5ee137 | 21 | Patch2: %{name}-shadowAccount.patch |
6fd83149 | 22 | BuildRequires: perl-base |
23 | BuildRequires: rpm-perlprov | |
475ddd8f | 24 | BuildRequires: rpmbuild(macros) >= 1.268 |
90fc17b0 | 25 | Requires: perl-base |
409cda91 | 26 | Requires: php(core) >= 5.0 |
8a35c6f1 ER |
27 | Requires: php(gettext) |
28 | Requires: php(hash) | |
29 | Requires: php(iconv) | |
30 | Requires: php(json) | |
31 | Requires: php(ldap) | |
32 | Requires: php(pcre) | |
33 | Requires: php(session) | |
34 | Requires: php(spl) | |
35 | Requires: php(xml) | |
36 | Requires: php(zip) | |
475ddd8f | 37 | Requires: webapps |
563219b8 AG |
38 | Requires: webserver(access) |
39 | Requires: webserver(alias) | |
40 | Requires: webserver(indexfile) | |
41 | Requires: webserver(php) | |
50edd543 MW |
42 | BuildArch: noarch |
43 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
44 | ||
475ddd8f SP |
45 | %define _webapps /etc/webapps |
46 | %define _webapp %{name} | |
47 | %define _sysconfdir %{_webapps}/%{_webapp} | |
48 | %define _appdir %{_datadir}/%{_webapp} | |
e5d21738 | 49 | %define _phpdocdir %{_docdir}/phpdoc |
475ddd8f | 50 | |
50edd543 | 51 | %description |
bc78364f | 52 | LDAP Account Manager (LAM) is a webfrontend for managing accounts |
563219b8 AG |
53 | stored in an LDAP server. |
54 | ||
55 | Features: | |
56 | - management of Unix user and group accounts (posixAccount/posixGroup) | |
57 | - management of Samba 2.x/3 user and host accounts | |
58 | (sambaAccount/sambaSamAccount) | |
59 | - profiles for account creation | |
60 | - editor for organizational units (OU) | |
61 | - account creation via file upload | |
62 | - automatic creation/deletion of home directories | |
63 | - setting quotas | |
64 | - support for LDAP+SSL | |
65 | - multi-language support (English, French, German, Hungarian, | |
66 | Japanese) | |
67 | - multiple configuration files | |
68 | - PDF output for user/group/host accounts | |
69 | - additional text for user PDFs | |
70 | - supports multiple password hashes | |
50edd543 | 71 | |
ebb5f7ae JR |
72 | %description -l pl.UTF-8 |
73 | LDAP Account Manager (LAM) to interfejs WWW do zarządzania kontami | |
563219b8 AG |
74 | przechowywanymi na serwerze LDAP. |
75 | ||
76 | Możliwości: | |
77 | - zarządzanie kontami uniksowych użytkowników i grup | |
78 | (posixAccount/posixGroup) | |
79 | - zarządzanie kontami użytkowników i hostów Samby 2.x/3 | |
80 | (sambaAccount/sambaSamAccount) | |
81 | - tworzenie profili dla kont | |
82 | - edytor jednostej organizacyjnych (OU) | |
83 | - tworzenie kont poprzez upload plików | |
84 | - automatyczne tworzenie/usuwanie katalogów domowych | |
85 | - ustawianie quot | |
86 | - obsługa LDAP+SSL | |
87 | - obsługa wielu języków (angielski, francuski, niemiecki, węgierski, | |
88 | japoński) | |
89 | - wiele plików konfiguracyjnych | |
90 | - wyjście PDF dla kont użytkowników/grup/hostów | |
91 | - dodatkowy tekst dla PDF-ów użytkownika | |
92 | - obsługa wielu skrótów haseł | |
50edd543 | 93 | |
90fc17b0 ER |
94 | %description -l de.UTF-8 |
95 | LDAP Account Manager (LAM) läuft auf einem exisierenden Webserver. LAM | |
96 | verwaltet Benutzer, Gruppen und Hosts. Zur Zeit werden folgende | |
97 | Account-Typen unterstützt: Samba 3, Unix, Kolab 2, Addressbuch | |
98 | Einträge, NIS mail Aliase und MAC-Addressen. Es gibt eine Baumansicht | |
99 | mit der man die LDAP-Daten direkt bearbeiten kann. Zum Anlegen von | |
100 | Accounts können Vorlagen definiert werden. Es können mehrere | |
101 | Konfigurations-Profile definiert werden. Account-Informationen können | |
102 | als PDF exportiert werden. Außerdem exisitiert ein Script mit dem man | |
103 | Quotas und Home-Verzeichnisse verwalten kann. | |
104 | ||
105 | %package lamdaemon | |
106 | Summary: Quota and home directory management for LDAP Account Manager | |
107 | Summary(de.UTF-8): Verwaltung von Quotas und Heimatverzeichnissen für LDAP Account Manager | |
933c8333 | 108 | Group: Applications/WWW |
90fc17b0 ER |
109 | Requires: perl-base |
110 | Requires: sudo | |
111 | ||
112 | %description lamdaemon | |
113 | Lamdaemon is part of LDAP Account Manager. This package needs to be | |
114 | installed on the server where the home directories reside and/or | |
115 | quotas should be managed. | |
116 | ||
117 | %description lamdaemon -l de.UTF-8 | |
118 | Lamdaemon ist Teil von LDAP Account Manager. Dieses Paket wird auf dem | |
119 | Server installiert, auf dem Quotas und Heimatverzeichnisse verwaltet | |
120 | werden sollen. | |
121 | ||
e5d21738 ER |
122 | %package phpdoc |
123 | Summary: Online manual for LDAP Account Manager | |
124 | Summary(pl.UTF-8): Dokumentacja online do LDAP Account Manager | |
125 | Group: Documentation | |
126 | Requires: php-dirs | |
127 | ||
128 | %description phpdoc | |
129 | Documentation for LDAP Account Manager. | |
130 | ||
131 | %description phpdoc -l pl.UTF-8 | |
132 | Dokumentacja do LDAP Account Manager. | |
133 | ||
50edd543 MW |
134 | %prep |
135 | %setup -q | |
e5d21738 | 136 | %patch0 -p1 |
a0f144c6 | 137 | %patch1 -p1 |
8a5ee137 | 138 | %patch2 -p1 |
e5d21738 | 139 | |
180c8461 ER |
140 | cp -p config/config.cfg{_sample,} |
141 | cp -p config/lam.conf{_sample,} | |
e5d21738 ER |
142 | mv config/*_sample . |
143 | ||
144 | find -name .htaccess | xargs rm | |
145 | ||
79335dd2 | 146 | rm COPYING Makefile.in configure install.sh |
50edd543 | 147 | |
a0f144c6 ER |
148 | rm locale/*/LC_MESSAGES/*.po |
149 | ||
50edd543 MW |
150 | %install |
151 | rm -rf $RPM_BUILD_ROOT | |
7e1e2b7b JR |
152 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir},%{_phpdocdir}/%{name}} \ |
153 | $RPM_BUILD_ROOT{/var/lib/%{name}/{sess,tmp},%{_sbindir}} | |
e5d21738 ER |
154 | |
155 | cp -a . $RPM_BUILD_ROOT%{_appdir} | |
50edd543 | 156 | |
7e1e2b7b JR |
157 | # daemon |
158 | mv $RPM_BUILD_ROOT%{_appdir}/lib/lamdaemon.pl $RPM_BUILD_ROOT%{_sbindir} | |
159 | ||
e5d21738 ER |
160 | # config |
161 | mv $RPM_BUILD_ROOT{%{_appdir}/config/*,%{_sysconfdir}} | |
180c8461 ER |
162 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
163 | cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
164 | cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
475ddd8f | 165 | |
e5d21738 | 166 | # apidocs |
79335dd2 JR |
167 | mv $RPM_BUILD_ROOT{%{_appdir}/docs/devel,%{_phpdocdir}/%{name}/devel} |
168 | mv $RPM_BUILD_ROOT{%{_appdir}/docs/manual,%{_phpdocdir}/%{name}/manual} | |
e5d21738 | 169 | |
d79a5864 ER |
170 | # in %doc, or otherwise unneeded |
171 | rm $RPM_BUILD_ROOT%{_appdir}/{HISTORY,README,copyright,configure.ac} | |
ee62d517 | 172 | |
7e1e2b7b JR |
173 | rm -rf $RPM_BUILD_ROOT%{_appdir}/{sess,tmp} |
174 | ln -s /var/lib/%{name}/sess $RPM_BUILD_ROOT%{_appdir}/sess | |
175 | ln -s /var/lib/%{name}/tmp $RPM_BUILD_ROOT%{_appdir}/tmp | |
176 | ||
3a100533 ER |
177 | %pretrans |
178 | # migrate dir to symlinks, don't worry about permissions, those be handled by rpm | |
593d19ca | 179 | if [ -d %{_appdir}/sess -a ! -L %{_appdir}/sess ]; then |
3a100533 ER |
180 | install -d /var/lib/%{name}/sess |
181 | mv %{_appdir}/sess/* /var/lib/%{name}/sess 2>/dev/null | |
182 | rm -rf %{_appdir}/sess | |
183 | ln -sf /var/lib/%{name}/sess %{_appdir}/sess | |
184 | fi | |
593d19ca | 185 | if [ -d %{_appdir}/tmp -a ! -L %{_appdir}/tmp ]; then |
3a100533 ER |
186 | install -d /var/lib/%{name}/tmp |
187 | mv %{_appdir}/tmp/* /var/lib/%{name}/tmp 2>/dev/null | |
188 | rm -rf %{_appdir}/tmp | |
189 | ln -sf /var/lib/%{name}/tmp %{_appdir}/tmp | |
190 | fi | |
191 | exit 0 | |
192 | ||
475ddd8f SP |
193 | %triggerin -- apache1 < 1.3.37-3, apache1-base |
194 | %webapp_register apache %{_webapp} | |
195 | ||
196 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
197 | %webapp_unregister apache %{_webapp} | |
198 | ||
199 | %triggerin -- apache < 2.2.0, apache-base | |
200 | %webapp_register httpd %{_webapp} | |
201 | ||
202 | %triggerun -- apache < 2.2.0, apache-base | |
203 | %webapp_unregister httpd %{_webapp} | |
204 | ||
205 | %triggerin -- lighttpd | |
206 | %webapp_register lighttpd %{_webapp} | |
207 | ||
208 | %triggerun -- lighttpd | |
209 | %webapp_unregister lighttpd %{_webapp} | |
210 | ||
50edd543 MW |
211 | %clean |
212 | rm -rf $RPM_BUILD_ROOT | |
213 | ||
50edd543 MW |
214 | %files |
215 | %defattr(644,root,root,755) | |
8475cb79 | 216 | %doc HISTORY README copyright |
475ddd8f SP |
217 | %dir %attr(750,root,http) %{_sysconfdir} |
218 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
219 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
220 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf | |
a10cf9ea JR |
221 | %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/config.cfg |
222 | %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lam.conf | |
180c8461 | 223 | #%attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/passwordMailTemplate.txt |
e5d21738 ER |
224 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/shells |
225 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/language | |
226 | %dir %attr(750,root,http) %{_sysconfdir}/pdf | |
227 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pdf/default.*.xml | |
228 | %dir %attr(750,root,http) %{_sysconfdir}/pdf/logos | |
229 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/pdf/logos/*.jpg | |
230 | %dir %attr(750,root,http) %{_sysconfdir}/profiles | |
231 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/profiles/default.* | |
232 | %dir %attr(750,root,http) %{_sysconfdir}/selfService | |
233 | %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/selfService/default.* | |
90fc17b0 | 234 | |
563219b8 | 235 | %dir %{_appdir} |
8475cb79 | 236 | %{_appdir}/VERSION |
e5d21738 | 237 | %{_appdir}/*_sample |
563219b8 AG |
238 | %{_appdir}/graphics |
239 | %{_appdir}/help | |
240 | %{_appdir}/lib | |
563219b8 AG |
241 | %{_appdir}/style |
242 | %{_appdir}/templates | |
243 | %{_appdir}/index.html | |
90fc17b0 | 244 | |
a0f144c6 ER |
245 | %dir %{_appdir}/locale |
246 | # XXX: verify language codes | |
247 | %lang(ca_ES) %{_appdir}/locale/ca_ES | |
248 | %lang(cs) %{_appdir}/locale/cs_CZ | |
249 | %lang(de) %{_appdir}/locale/de_DE | |
250 | %lang(es) %{_appdir}/locale/es_ES | |
251 | %lang(fr) %{_appdir}/locale/fr_FR | |
252 | %lang(hu) %{_appdir}/locale/hu_HU | |
253 | %lang(it) %{_appdir}/locale/it_IT | |
254 | %lang(ja) %{_appdir}/locale/ja_JP | |
255 | %lang(nl) %{_appdir}/locale/nl_NL | |
256 | %lang(pl) %{_appdir}/locale/pl_PL | |
257 | %lang(pt_BR) %{_appdir}/locale/pt_BR | |
258 | %lang(ru) %{_appdir}/locale/ru_RU | |
259 | %lang(zh_CN) %{_appdir}/locale/zh_CN | |
260 | %lang(zh_TW) %{_appdir}/locale/zh_TW | |
180c8461 | 261 | %lang(sk) %{_appdir}/locale/sk_SK |
a0f144c6 | 262 | |
eb7ad3b3 ER |
263 | %dir %dir %attr(750,root,http) /var/lib/%{name} |
264 | %dir %attr(770,root,http) /var/lib/%{name}/sess | |
265 | %dir %attr(770,root,http) /var/lib/%{name}/tmp | |
7e1e2b7b JR |
266 | # symlinks to /var/lib/... |
267 | %{_appdir}/sess | |
268 | %{_appdir}/tmp | |
90fc17b0 ER |
269 | |
270 | %files lamdaemon | |
271 | %defattr(644,root,root,755) | |
7e1e2b7b | 272 | %attr(755,root,root) %{_sbindir}/lamdaemon.pl |
e5d21738 ER |
273 | |
274 | %files phpdoc | |
275 | %defattr(644,root,root,755) | |
276 | %{_phpdocdir}/%{name} |