new release for RSA
[external/iniparser.git] / packaging / iniparser.spec
1 #sbs-git:slp/unmodified/iniparser iniparser 2.17 2a9012b9ef8ccf91d380cd8293767ab6f101830b
2 Name:       iniparser
3 Summary:    Stand-alone ini file parsing library
4 Version: 2.17
5 Release:    1
6 Group:      Applications/Databases
7 License:    MIT
8 URL:        http://ndevilla.free.fr/iniparser/
9 Source:     http://ndevilla.free.fr/iniparser/iniparser-%{version}.tar.gz
10 Requires(post): /sbin/ldconfig
11 Requires(postun): /sbin/ldconfig
12
13 %description
14 iniparser is a free stand-alone ini file parsing library.
15 It is written in portable ANSI C and should compile anywhere.
16 iniparser is distributed under an MIT license.
17
18 %package devel
19 Summary:    Development tools for stand-alone ini file parsing library
20 Group:      Development/Libraries
21 Requires:   %{name} = %{version}-%{release}
22
23 %description devel
24 This package contains the header files and development documentation
25 for %{name}. If you like to develop programs using %{name}, you will need
26 to install %{name}-devel.
27
28 %prep
29 %setup -q
30
31 %build
32
33 LDFLAGS="-Wl,--rpath=%{_prefix}/lib -Wl,--hash-style=both -Wl,--as-needed $LDFLAGS" \
34         make prefix=%{_prefix}
35
36 make %{?jobs:-j%jobs}
37
38 %install
39 rm -rf %{buildroot}
40
41 mkdir -p $RPM_BUILD_ROOT/%{_libdir}
42 install -m 755 libiniparser.so.0 $RPM_BUILD_ROOT/%{_libdir}
43 ln -s libiniparser.so.0 $RPM_BUILD_ROOT/%{_libdir}/libiniparser.so
44 mkdir -p $RPM_BUILD_ROOT/%{_includedir}
45 install -m 755 src/*.h $RPM_BUILD_ROOT/%{_includedir}
46 install -m 755 src/*.h $RPM_BUILD_ROOT/%{_includedir}
47 mkdir -p $RPM_BUILD_ROOT/%{_libdir}/pkgconfig
48 cat > $RPM_BUILD_ROOT/%{_libdir}/pkgconfig/%{name}.pc <<EOF
49 prefix = %{_prefix}
50 exec_prefix = %{_exec_prefix}
51 libdir = %{_libdir}
52 includedir = %{_includedir}
53
54 Name : iniparser
55 Description : a free stand-alone ini file parsing library.
56 Version : %{version}
57 Libs : -L\${libdir} -liniparser
58 Cflags : -I\${includedir}
59
60 EOF
61
62 %post -p /sbin/ldconfig
63
64 %postun -p /sbin/ldconfig
65
66 %files
67 %{_libdir}/*.so.*
68
69 %files devel
70 %{_includedir}/*.h
71 %{_libdir}/*.so
72 %{_libdir}/pkgconfig/*.pc