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