Use dpkg-buildflags in build process
[yazpp-moved-to-github.git] / yazpp.spec
1 %define idmetaversion %(. ./IDMETA; echo $VERSION|tr -d '\n')
2 Summary: YAZ++ package (main)
3 Name: yazpp
4 Version: %{idmetaversion}
5 Release: 1indexdata
6 License: BSD
7 Group: Applications/Internet
8 Vendor: Index Data ApS <info@indexdata.dk>
9 Source: yazpp-%{version}.tar.gz
10 BuildRoot: %{_tmppath}/%{name}-%{version}-root
11 Prefix: %{_prefix}
12 BuildRequires: pkgconfig, libyaz4-devel >= 4.2.8
13 Packager: Adam Dickmeiss <adam@indexdata.dk>
14 URL: http://www.indexdata.com/yazplusplus
15
16 %description
17 YAZ++ package.
18
19 %package -n libyazpp4
20 Summary: YAZ++ and ZOOM library
21 Group: Libraries
22 Requires: libyaz4 >= 4.2.8
23
24 %description -n libyazpp4
25 Libraries for the YAZ++ package.
26
27 %package -n libyazpp4-devel
28 Summary: Z39.50 Library - development package
29 Group: Development/Libraries
30 Requires: libyazpp4 = %{version}, libyaz4-devel
31
32 %description -n libyazpp4-devel
33 Development libraries and include files for the YAZ++ package.
34
35 %prep
36 %setup
37
38 %build
39
40 CFLAGS="$RPM_OPT_FLAGS" \
41  ./configure --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} \
42         --enable-shared --with-yaz=/usr/bin
43 make CFLAGS="$RPM_OPT_FLAGS"
44
45 %install
46 rm -fr ${RPM_BUILD_ROOT}
47 make prefix=${RPM_BUILD_ROOT}/%{_prefix} mandir=${RPM_BUILD_ROOT}/%{_mandir} \
48         libdir=${RPM_BUILD_ROOT}/%{_libdir} install
49 rm ${RPM_BUILD_ROOT}/%{_libdir}/*.la
50
51 %clean
52 rm -fr ${RPM_BUILD_ROOT}
53
54 %post -n libyazpp4 -p /sbin/ldconfig 
55 %postun -n libyazpp4 -p /sbin/ldconfig 
56
57 %files -n libyazpp4
58 %doc README LICENSE NEWS
59 %defattr(-,root,root)
60 %{_libdir}/*.so.*
61
62 %files -n libyazpp4-devel
63 %defattr(-,root,root)
64 %{_bindir}/yazpp-config
65 %{_includedir}/yazpp
66 %{_libdir}/*.so
67 %{_libdir}/*.a
68 %{_datadir}/aclocal/yazpp.m4
69 %{_mandir}/man?/yazpp-config.*
70 %{_datadir}/doc/yazpp
71