]> git.pld-linux.org Git - packages/apr-util.git/blob - apr-util.spec
2c51784f1803f9676c642f13c21f7bf35d43adf9
[packages/apr-util.git] / apr-util.spec
1 # TODO
2 # - play with DSO dbd's
3 # - licensing issues with mysql. can we (PLD Linux) package it inside
4 #   apr-util? see INSTALL.MySQL for more details
5 #
6 # Conditional build:
7 %bcond_without  ldap    # without LDAP support
8 %bcond_with     mysql   # with MySQL support
9 %bcond_without  pgsql   # without PostgreSQL support
10 %bcond_with     sqlite  # with SQLite 2.x support
11 %bcond_without  sqlite3 # without SQLite3 support
12 #
13 Summary:        A companion library to Apache Portable Runtime
14 Summary(pl):    Biblioteka towarzysz±ca Apache Portable Runtime
15 Name:           apr-util
16 Version:        1.2.2
17 Release:        1.10
18 Epoch:          1
19 License:        Apache v2.0
20 Group:          Libraries
21 Source0:        http://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2
22 # Source0-md5:  694228b227e30cb9da3823514516e91c
23 Source1:        http://apache.webthing.com/database/apr_dbd_mysql.c
24 # Source1-md5:  59d26a91cb7f1492fea9ab3e6cd054fc
25 Patch0:         %{name}-link.patch
26 Patch1:         %{name}-mysql.patch
27 URL:            http://apr.apache.org/
28 BuildRequires:  apr-devel >= 1:1.1.0
29 BuildRequires:  autoconf
30 BuildRequires:  db-devel
31 BuildRequires:  expat-devel
32 BuildRequires:  gdbm-devel
33 BuildRequires:  libtool
34 %{?with_mysql:BuildRequires:    mysql-devel}
35 %{?with_ldap:BuildRequires:     openldap-devel}
36 %{?with_pgsql:BuildRequires:    postgresql-devel}
37 %{?with_sqlite:BuildRequires:   sqlite-devel >= 2}
38 %{?with_sqlite3:BuildRequires:  sqlite3-devel >= 3}
39 %{?with_mysql:BuildRequires:    apr-devel >= 1:1.2.2-2.6}
40 Requires:       apr >= 1:1.1.0
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         _includedir     /usr/include/apr-util
44
45 %description
46 A companion library to Apache Portable Runtime.
47
48 %description -l pl
49 Biblioteka towarzysz±ca dla biblioteki Apache Portable Runtime
50 (przeno¶nej biblioteki uruchomieniowej).
51
52 %package devel
53 Summary:        Header files and development documentation for apr-util
54 Summary(pl):    Pliki nag³ówkowe i dokumentacja programisty do apr-util
55 Group:          Development/Libraries
56 Requires:       %{name} = %{epoch}:%{version}-%{release}
57 Requires:       apr-devel >= 1:1.1.0
58 Requires:       db-devel
59 Requires:       expat-devel
60 Requires:       gdbm-devel
61 %{?with_mysql:Requires: mysql-devel}
62 %{?with_ldap:Requires:  openldap-devel}
63 %{?with_pgsql:Requires: postgresql-devel}
64 %{?with_sqlite:Requires:        sqlite-devel >= 2}
65 %{?with_sqlite3:Requires:       sqlite3-devel >= 3}
66
67 %description devel
68 Header files and development documentation for apr-util.
69
70 %description devel -l pl
71 Pliki nag³ówkowe i dokumentacja programisty do apr-util.
72
73 %package static
74 Summary:        Static apr-util library
75 Summary(pl):    Statyczna biblioteka apr-util
76 Group:          Development/Libraries
77 Requires:       %{name}-devel = %{epoch}:%{version}-%{release}
78
79 %description static
80 Static apr-util library.
81
82 %description static -l pl
83 Statyczna biblioteka apr-util.
84
85 %prep
86 %setup -q
87 %patch0 -p1
88 %patch1 -p1
89 %if %{with mysql}
90 cp %{SOURCE1} dbd/apr_dbd_mysql.c
91 %else
92 # not needed, gen-build.py is not packaged in apr-util
93 # (and it shouldn't apr-devel should have it -glen)
94 %{__perl} -pi -e 's/^(.*gen-build\.py)/#$1/' buildconf
95 %endif
96
97 %build
98 ./buildconf \
99         --with-apr=%{_datadir}/apr
100
101 %configure \
102         --with-apr=%{_bindir}/apr-1-config \
103 %if %{with ldap}
104         --with-ldap \
105         --with-ldap-include=%{_prefix}/include \
106         --with-ldap-lib=%{_libdir} \
107 %endif
108         --with-iconv=%{_prefix} \
109         %{?with_mysql:--with-mysql=%{_prefix}} \
110         %{!?with_pgsql:--without-pgsql} \
111         %{!?with_sqlite:--without-sqlite2} \
112         %{!?with_sqlite3:--without-sqlite3}
113
114 %{__make}
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118
119 %{__make} install \
120         DESTDIR=$RPM_BUILD_ROOT
121
122 %clean
123 rm -rf $RPM_BUILD_ROOT
124
125 %post   -p /sbin/ldconfig
126 %postun -p /sbin/ldconfig
127
128 %files
129 %defattr(644,root,root,755)
130 %doc CHANGES
131 %{?with_mysql:%doc INSTALL.MySQL}
132 %attr(755,root,root) %{_libdir}/lib*.so.*.*
133
134 %files devel
135 %defattr(644,root,root,755)
136 %attr(755,root,root) %{_bindir}/*
137 %attr(755,root,root) %{_libdir}/lib*.so
138 %{_libdir}/lib*.la
139 %{_libdir}/aprutil.exp
140 %{_includedir}
141 %{_pkgconfigdir}/apr-util-1.pc
142
143 %files static
144 %defattr(644,root,root,755)
145 %{_libdir}/lib*.a
This page took 0.06442 seconds and 2 git commands to generate.