libcap-ng-vl.spec 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. %define build_compat32 %{?_with_compat32:1}%{!?_with_compat32:0}
  2. %define _unpackaged_files_terminate_build 1
  3. Summary: An alternate posix capabilities library
  4. Name: libcap-ng
  5. Version: 0.8.2
  6. Release: 1%{?_dist_release}
  7. Group: system
  8. Vendor: Project Vine
  9. Distribution: Vine Linux
  10. License: LGPLv2+
  11. URL: http://people.redhat.com/sgrubb/libcap-ng/
  12. Source0: http://people.redhat.com/sgrubb/libcap-ng/%{name}-%{version}.tar.gz
  13. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  14. BuildRequires: kernel-headers >= 2.6.11
  15. BuildRequires: libattr-devel
  16. %description
  17. Libcap-ng is a library that makes using posix capabilities easier
  18. %package devel
  19. Summary: Header files for libcap-ng library
  20. License: LGPLv2+
  21. Group: programming
  22. Requires: kernel-headers >= 2.6.11
  23. Requires: %{name} = %{version}-%{release}
  24. Requires: pkgconfig
  25. %description devel
  26. The libcap-ng-devel package contains the files needed for developing
  27. applications that need to use the libcap-ng library.
  28. %package python
  29. Summary: Python bindings for libcap-ng library
  30. License: LGPLv2+
  31. Group: programming
  32. BuildRequires: python-devel swig
  33. BuildRequires: python-rpm-macros
  34. Requires: %{name} = %{version}-%{release}
  35. %description python
  36. The libcap-ng-python package contains the bindings so that libcap-ng
  37. and can be used by python applications.
  38. %package python3
  39. Summary: Python3 bindings for libcap-ng library
  40. License: LGPLv2+
  41. Group: programming
  42. BuildRequires: python3-devel swig
  43. BuildRequires: python3-rpm-macros
  44. Requires: %{name} = %{version}-%{release}
  45. %description python3
  46. The libcap-ng-python3 package contains the bindings so that libcap-ng
  47. and can be used by python3 applications.
  48. %package utils
  49. Summary: Utilities for analysing and setting file capabilities
  50. License: GPLv2+
  51. Group: admin-tools
  52. Requires: %{name} = %{version}-%{release}
  53. %description utils
  54. The libcap-ng-utils package contains applications to analyse the
  55. posix capabilities of all the program running on a system. It also
  56. lets you set the file system based capabilities.
  57. %package -n compat32-%{name}
  58. Summary: An alternate posix capabilities library
  59. Group: system
  60. Requires: %{name} = %{version}-%{release}
  61. %description -n compat32-%{name}
  62. Libcap-ng is a library that makes using posix capabilities easier
  63. %package -n compat32-%{name}-devel
  64. Summary: Header files for libcap-ng library
  65. Group: programming
  66. License: LGPLv2+
  67. Requires: %{name}-devel = %{version}-%{release}
  68. %description -n compat32-%{name}-devel
  69. The libcap-ng-devel package contains the files needed for developing
  70. applications that need to use the libcap-ng library.
  71. %debug_package
  72. %prep
  73. %setup -q
  74. %build
  75. %configure --libdir=/%{_lib} --with-python --with-python3
  76. make %{?_smp_mflags}
  77. %install
  78. rm -rf $RPM_BUILD_ROOT
  79. make DESTDIR="${RPM_BUILD_ROOT}" install
  80. # Move the symlink
  81. rm -f $RPM_BUILD_ROOT/%{_lib}/%{name}.so
  82. mkdir -p $RPM_BUILD_ROOT%{_libdir}
  83. VLIBNAME=$(ls $RPM_BUILD_ROOT/%{_lib}/%{name}.so.*.*.*)
  84. LIBNAME=$(basename $VLIBNAME)
  85. ln -s ../../%{_lib}/$LIBNAME $RPM_BUILD_ROOT%{_libdir}/%{name}.so
  86. # Move the pkgconfig file
  87. mv $RPM_BUILD_ROOT/%{_lib}/pkgconfig $RPM_BUILD_ROOT%{_libdir}
  88. # Remove a couple things so they don't get picked up
  89. rm -f $RPM_BUILD_ROOT/%{_lib}/libcap-ng.la
  90. rm -f $RPM_BUILD_ROOT/%{_lib}/libcap-ng.a
  91. rm -f $RPM_BUILD_ROOT/%{_lib}/libdrop_ambient.la
  92. rm -f $RPM_BUILD_ROOT/%{_lib}/libdrop_ambient.a
  93. rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_capng.a
  94. rm -f $RPM_BUILD_ROOT/%{_libdir}/python?.?/site-packages/_capng.la
  95. %check
  96. make check
  97. %clean
  98. rm -rf $RPM_BUILD_ROOT
  99. %post -p /sbin/ldconfig
  100. %postun -p /sbin/ldconfig
  101. %post -n compat32-%{name} -p /sbin/ldconfig
  102. %postun -n compat32-%{name} -p /sbin/ldconfig
  103. %files
  104. %defattr(-,root,root,-)
  105. %license COPYING.LIB
  106. %attr(0755,root,root) /%{_lib}/libcap-ng.so.*
  107. %attr(0755,root,root) /%{_lib}/libdrop_ambient.so.*
  108. %files devel
  109. %defattr(-,root,root,-)
  110. %attr(0644,root,root) %{_mandir}/man3/*
  111. %attr(0644,root,root) %{_mandir}/man7/*
  112. %attr(0644,root,root) %{_includedir}/cap-ng.h
  113. %attr(0755,root,root) %{_libdir}/libcap-ng.so
  114. %attr(0755,root,root) /%{_lib}/libdrop_ambient.so
  115. %attr(0644,root,root) %{_datadir}/aclocal/cap-ng.m4
  116. %{_libdir}/pkgconfig/libcap-ng.pc
  117. %files python
  118. %defattr(-,root,root,-)
  119. %attr(755,root,root) /%{_libdir}/python?.?/site-packages/_capng.so
  120. %{python_sitearch}/capng.py*
  121. %files python3
  122. %defattr(-,root,root,-)
  123. %attr(755,root,root) %{python3_sitearch}/*
  124. %{python3_sitearch}/capng.py*
  125. %files utils
  126. %defattr(-,root,root,-)
  127. %doc COPYING
  128. %attr(0755,root,root) %{_bindir}/*
  129. %attr(0644,root,root) %{_mandir}/man8/*
  130. %if %{build_compat32}
  131. %files -n compat32-%{name}
  132. %defattr(-,root,root,-)
  133. %attr(0755,root,root) /%{_lib}/libcap-ng.so.*
  134. %files -n compat32-%{name}-devel
  135. %defattr(-,root,root,-)
  136. %attr(0755,root,root) %{_libdir}/libcap-ng.so
  137. %{_libdir}/pkgconfig/libcap-ng.pc
  138. %endif
  139. %changelog
  140. * Wed Feb 17 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.8.2-1
  141. - new upstream release.
  142. * Sun Apr 12 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.7.10-1
  143. - new upstream release.
  144. * Tue Feb 27 2018 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.7.9-1
  145. - new upstream release.
  146. - added compat32-* packages.
  147. - enabled python3 modules.
  148. * Sat Jan 04 2014 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.3-2
  149. - rebuild with VineSeed environment
  150. * Mon Jan 07 2013 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.3-1
  151. - new upstream release
  152. * Sun Oct 28 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.7.1-1
  153. - new upstream release
  154. * Mon Feb 20 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6.6-2
  155. - rebuild with python-2.7.2
  156. * Sun Aug 14 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.6.6-1
  157. - initial build for Vine Linux
  158. * Fri Jun 24 2011 Steve Grubb <sgrubb@redhat.com> 0.6.6-1
  159. - New upstream release
  160. * Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.5-2
  161. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  162. * Wed Nov 03 2010 Steve Grubb <sgrubb@redhat.com> 0.6.5-1
  163. - New upstream release fixing 2.6.36 kernel header issue
  164. * Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.4-4
  165. - Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
  166. * Thu Jun 17 2010 Steve Grubb <sgrubb@redhat.com> 0.6.4-3
  167. - Only open regular files in filecap
  168. * Mon May 24 2010 Steve Grubb <sgrubb@redhat.com> 0.6.4-2
  169. - In utils subpackage added a requires statement.
  170. * Thu May 06 2010 Steve Grubb <sgrubb@redhat.com> 0.6.4-1
  171. - New upstream release fixing multi-threading issue
  172. * Wed Apr 28 2010 Steve Grubb <sgrubb@redhat.com> 0.6.3-2
  173. - filecap shows full capabilities if a file has any
  174. * Thu Mar 11 2010 Steve Grubb <sgrubb@redhat.com> 0.6.3-1
  175. - New upstream release
  176. * Tue Feb 16 2010 Steve Grubb <sgrubb@redhat.com> 0.6.2-4
  177. - Use global macro and require pkgconfig for devel subpackage
  178. * Fri Oct 09 2009 Steve Grubb <sgrubb@redhat.com> 0.6.2-3
  179. - Apply patch to retain setpcap only if clearing bounding set
  180. * Sat Oct 03 2009 Steve Grubb <sgrubb@redhat.com> 0.6.2-2
  181. - Apply patch correcting pscap and netcap acct detection
  182. * Mon Sep 28 2009 Steve Grubb <sgrubb@redhat.com> 0.6.2-1
  183. - New upstream release
  184. * Sun Jul 26 2009 Steve Grubb <sgrubb@redhat.com> 0.6.1-1
  185. - New upstream release
  186. * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6-2
  187. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  188. * Mon Jun 29 2009 Steve Grubb <sgrubb@redhat.com> 0.6-1
  189. - New upstream release
  190. * Sun Jun 21 2009 Steve Grubb <sgrubb@redhat.com> 0.5.1-1
  191. - New upstream release
  192. * Fri Jun 19 2009 Steve Grubb <sgrubb@redhat.com> 0.5-1
  193. - New upstream release
  194. * Fri Jun 12 2009 Steve Grubb <sgrubb@redhat.com> 0.4.2-1
  195. - New upstream release
  196. * Fri Jun 12 2009 Steve Grubb <sgrubb@redhat.com> 0.4.1-1
  197. - Initial build.