tizen 2.0
[external/popt.git] / packaging / popt.spec
1 Name:       popt
2 Summary:    C library for parsing command line parameters
3 Version:    1.16
4 Release:    1
5 Group:      System/Libraries
6 License:    MIT
7 URL:        http://www.rpm5.org/
8 Source0:    http://www.rpm5.org/files/%{name}/%{name}-%{version}.tar.gz
9 Requires(post): /sbin/ldconfig
10 Requires(postun): /sbin/ldconfig
11
12
13 %description
14 Popt is a C library for parsing command line parameters. Popt was
15 heavily influenced by the getopt() and getopt_long() functions, but
16 it improves on them by allowing more powerful argument expansion.
17 Popt can parse arbitrary argv[] style arrays and automatically set
18 variables based on command line arguments. Popt allows command line
19 arguments to be aliased via configuration files and includes utility
20 functions for parsing arbitrary strings into argv[] arrays using
21 shell-like rules.
22
23
24
25 %package devel
26 Summary:    Development files for the popt library
27 Group:      Development/Libraries
28 Requires:   %{name} = %{version}-%{release}
29
30 %description devel
31 The popt-devel package includes header files and libraries necessary
32 for developing programs which use the popt C library. It contains the
33 API documentation of the popt library, too.
34
35
36
37 %prep
38 %setup -q -n %{name}-%{version}
39
40 %build
41
42 %configure --disable-static \
43     --libdir=/%{_lib} \
44     --disable-nls
45
46 make %{?jobs:-j%jobs}
47
48 %install
49 rm -rf %{buildroot}
50 %make_install
51
52 # Move libpopt.{so,a} to %{_libdir}
53 rm -f $RPM_BUILD_ROOT/%{_lib}/libpopt.{la,so}
54 pushd $RPM_BUILD_ROOT/%{_lib}
55 mkdir -p $RPM_BUILD_ROOT%{_libdir}
56 ln -sf ../../%{_lib}/$(ls libpopt.so.?.?.?) $RPM_BUILD_ROOT%{_libdir}/libpopt.so
57 popd
58
59 # Multiple popt configurations are possible
60 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/popt.d
61
62
63 %post -p /sbin/ldconfig
64
65 %postun -p /sbin/ldconfig
66
67
68 %files
69 %defattr(-,root,root,-)
70 %doc COPYING
71 %{_sysconfdir}/popt.d
72 /%{_lib}/libpopt.so.*
73
74
75 %files devel
76 %defattr(-,root,root,-)
77 %doc README
78 #%doc doxygen/html
79 %{_libdir}/libpopt.so
80 %{_libdir}/pkgconfig/popt.pc
81 %{_includedir}/popt.h
82 %doc %{_mandir}/man3/popt.3*