]>
Commit | Line | Data |
---|---|---|
86955824 | 1 | %define mod_name cfg_ldap |
a98d61e9 | 2 | %define apxs /usr/sbin/apxs |
87911b01 | 3 | Summary: Module to keep Apache VirtualHost configuration in an LDAP directory |
e8871a09 | 4 | Summary(pl.UTF-8): Moduł do przechowywania konfiguracji serwerów wirtualnych Apache'a w katalogu LDAP |
86955824 | 5 | Name: apache-mod_%{mod_name} |
722673fd | 6 | Version: 1.2 |
b65a6900 | 7 | Release: 4 |
87911b01 | 8 | License: BSD |
a9c5521a | 9 | Group: Networking/Daemons/HTTP |
86955824 | 10 | Source0: http://dl.sourceforge.net/modcfgldap/mod_%{mod_name}-%{version}.tar.gz |
722673fd | 11 | # Source0-md5: 055924d6488608f684b22e7b04cea2ea |
b65a6900 | 12 | Patch0: %{name}-openldap-2.3.patch |
c5b64319 | 13 | URL: http://sourceforge.net/projects/modcfgldap/ |
e9917d1c | 14 | BuildRequires: %{apxs} |
be1bdacc | 15 | BuildRequires: apache-devel >= 2.0 |
a98d61e9 | 16 | BuildRequires: db-devel >= 4.2.52 |
e9704f92 | 17 | BuildRequires: openldap-devel >= 2.4.6 |
f5635965 | 18 | BuildRequires: rpmbuild(macros) >= 1.304 |
be1bdacc | 19 | Requires: apache(modules-api) = %apache_modules_api |
a98d61e9 | 20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
be1bdacc | 22 | %define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) |
c5b64319 | 23 | %define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null)/conf.d |
b7ae4f00 | 24 | %define schemadir /usr/share/openldap/schema |
86955824 | 25 | |
a98d61e9 | 26 | %description |
27 | mod_cfg_ldap allows you to keep your virtual host configuration in a | |
28 | LDAP directory and update it in nearly realtime. | |
29 | ||
1b0ab29d JR |
30 | %description -l pl.UTF-8 |
31 | mod_cfg_ldap pozwala na przechowywanie konfiguracji hostów wirtualnych | |
87911b01 JB |
32 | w katalogu LDAP i uaktualnianie jej prawie w czasie rzeczywistym. |
33 | ||
b7ae4f00 | 34 | %package -n openldap-schema-mod_cfg_ldap |
f5635965 | 35 | Summary: mod_cfg_ldap LDAP schema |
36 | Summary(pl.UTF-8): Schemat LDAP dla mod_cfg_ldap | |
a9c5521a | 37 | Group: Networking/Daemons/HTTP |
f5635965 | 38 | Requires: openldap-servers |
b7ae4f00 | 39 | |
40 | %description -n openldap-schema-mod_cfg_ldap | |
41 | This package contains LDAP schema for use with mod_cfg_ldap. | |
42 | ||
43 | %description -n openldap-schema-mod_cfg_ldap -l pl.UTF-8 | |
44 | Ten pakiet zawiera schemat LDAP do używania z mod_cfg_ldap. | |
45 | ||
a98d61e9 | 46 | %prep |
86955824 | 47 | %setup -q -n mod_%{mod_name}-%{version} |
b65a6900 | 48 | %patch0 -p1 |
a98d61e9 | 49 | |
50 | %build | |
9b9eee32 | 51 | %{__make} all \ |
52 | APXS=%{apxs} | |
a98d61e9 | 53 | |
54 | %install | |
55 | rm -rf $RPM_BUILD_ROOT | |
c5b64319 | 56 | install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir},%{schemadir}} |
a98d61e9 | 57 | |
c5b64319 ER |
58 | install -p .libs/mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir} |
59 | cp -p cfg_ldap.conf $RPM_BUILD_ROOT%{_sysconfdir}/85_mod_cfg_ldap.conf | |
60 | cp -p mod_cfg_ldap.schema $RPM_BUILD_ROOT%{schemadir}/mod_cfg_ldap.schema | |
a98d61e9 | 61 | |
62 | %clean | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | ||
be1bdacc | 65 | %post |
deaf7be5 | 66 | %service -q httpd restart |
be1bdacc ER |
67 | |
68 | %postun | |
69 | if [ "$1" = "0" ]; then | |
deaf7be5 | 70 | %service -q httpd restart |
be1bdacc ER |
71 | fi |
72 | ||
f5635965 | 73 | %post -n openldap-schema-mod_cfg_ldap |
74 | %openldap_schema_register %{schemadir}/mod_cfg_ldap.schema | |
75 | %service -q ldap restart | |
76 | ||
77 | %postun -n openldap-schema-mod_cfg_ldap | |
78 | if [ "$1" = "0" ]; then | |
79 | %openldap_schema_unregister %{schemadir}/mod_cfg_ldap.schema | |
80 | %service -q ldap restart | |
81 | fi | |
82 | ||
a98d61e9 | 83 | %files |
84 | %defattr(644,root,root,755) | |
b7ae4f00 | 85 | %doc AUTHORS ChangeLog INSTALL README TODO |
c5b64319 | 86 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*_mod_%{mod_name}.conf |
86955824 | 87 | %attr(755,root,root) %{_pkglibdir}/*.so |
b7ae4f00 | 88 | |
89 | %files -n openldap-schema-mod_cfg_ldap | |
90 | %defattr(644,root,root,755) | |
91 | %{schemadir}/*.schema |