]> git.pld-linux.org Git - packages/apache-mod_auth_mysql.git/blob - apache-mod_auth_mysql.spec
1619a24fff8ffc1834bf691c0cafda510e1c24aa
[packages/apache-mod_auth_mysql.git] / apache-mod_auth_mysql.spec
1 %define         mod_name        auth_mysql
2 Summary:        This is the MySQL authentication module for Apache
3 Summary(pl):    Modu³ autentykacji MySQL dla Apache
4 Name:           apache-mod_%{mod_name}
5 Version:        0.3
6 Release:        2
7 License:        GPL
8 Group:          Networking/Daemons
9 Group(de):      Netzwerkwesen/Server
10 Group(pl):      Sieciowe/Serwery
11 Source0:        ftp://ftp.kcilink.com/pub/mod_%{mod_name}.c.gz
12 BuildRequires:  mysql-devel
13 BuildRequires:  /usr/sbin/apxs
14 BuildRequires:  apache(EAPI)-devel
15 Prereq:         /usr/sbin/apxs
16 Requires:       apache(EAPI)
17 URL:            http://modntlm.sourceforge.net/
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %define         _pkglibdir      %(/usr/sbin/apxs -q LIBEXECDIR)
21
22 %description
23 This is an authentication module for Apache that allows you to
24 authenticate HTTP clients using mysql RDBMS.
25
26 %description -l pl
27 To jest modu³ autentykacji dla Apache pozwalaj±cy na autentykacjê
28 klientów HTTP z u¿yciem bazy danych mysql.
29
30 %prep 
31 %setup -q -T -c
32 cp %{SOURCE0} .
33 gzip -d mod_%{mod_name}.c.gz
34
35 %build
36 /usr/sbin/apxs -c mod_%{mod_name}.c -o mod_%{mod_name}.so -lmysqlclient
37
38 %install
39 rm -rf $RPM_BUILD_ROOT
40 install -d $RPM_BUILD_ROOT%{_pkglibdir}
41
42 install mod_%{mod_name}.so $RPM_BUILD_ROOT%{_pkglibdir}
43
44 %post
45 /usr/sbin/apxs -e -a -n mysql_auth_module %{_pkglibdir}/mod_%{mod_name}.so 1>&2
46 if [ -f /var/lock/subsys/httpd ]; then
47         /etc/rc.d/init.d/httpd restart 1>&2
48 fi
49
50 %preun
51 if [ "$1" = "0" ]; then
52         /usr/sbin/apxs -e -A -n mysql_auth_module %{_pkglibdir}/mod_%{mod_name}.so 1>&2
53         if [ -f /var/lock/subsys/httpd ]; then
54                 /etc/rc.d/init.d/httpd restart 1>&2
55         fi
56 fi
57
58 %clean
59 rm -rf $RPM_BUILD_ROOT
60
61 %files
62 %defattr(644,root,root,755)
63 %attr(755,root,root) %{_pkglibdir}/*
This page took 0.05827 seconds and 2 git commands to generate.