1# Note that this is NOT a relocatable package
2%define ver      @VERSION@
3%define prefix   /usr
4
5Summary: Library for reading dbase files
6Name: libdbf
7Version: %ver
8Release: 1
9Copyright: LGPL
10Group: Development/Libraries
11Source: http://prdownloads.sourceforge.net/libdbf/libdbf-%{ver}.tar.gz
12BuildRoot: /var/tmp/libdbf-%{PACKAGE_VERSION}-root
13
14URL: http://libdbf.sourceforge.net/
15Docdir: %{prefix}/doc
16
17%description
18This library allows to read dbase files.
19
20%package devel
21Summary: Libraries, includes, etc. to develop dbase applications
22Group: Development/Libraries
23Requires: libdbf = %{version}
24
25%description devel
26Libraries, include files, etc you can use to develop dbase applications.
27
28%changelog
29
30%prep
31%setup
32
33%build
34# Needed for snapshot releases.
35if [ ! -f configure ]; then
36  CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=%{prefix} --mandir=%{prefix}/share/man
37else
38  CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --mandir=%{prefix}/share/man
39fi
40
41if [ "$SMP" != "" ]; then
42  (make "MAKE=make -k -j $SMP"; exit 0)
43  make
44else
45  make
46fi
47
48%install
49rm -rf $RPM_BUILD_ROOT
50
51make DESTDIR=$RPM_BUILD_ROOT install
52
53%clean
54rm -rf $RPM_BUILD_ROOT
55
56%post -p /sbin/ldconfig
57
58%postun -p /sbin/ldconfig
59
60%files
61%defattr(-, root, root)
62
63%doc AUTHORS ChangeLog NEWS README COPYING
64%{prefix}/lib/lib*.so.*
65%attr(-,root,root) %{prefix}/share/locale/*/LC_MESSAGES/*
66
67%files devel
68%defattr(-, root, root)
69
70%{prefix}/lib/lib*.so
71%{prefix}/lib/*a
72%{prefix}/lib/*la
73%{prefix}/include/*
74%{prefix}/lib/pkgconfig/*
75%doc %{prefix}/share/man/man3/*.3*
76