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