# Special names here like {__make} come from /usr/lib/rpm/macros, /usr/lib/rpm/macros.rpmbuild %define lnb_version @VERSION@ %define lnb_name libnetblock %define lnb_release 1 %define lnb_url https://libnetblock.sourceforge.io %define lnb_descr LibNetBlock is a preloadable library which intercepts and blocks system calls\ that are used to access the network. %define lnb_lic GPLv3+ %define lnb_summary Library for blocking network access Summary: %{lnb_summary} Name: %{lnb_name} Version: %{lnb_version} Release: %{lnb_release} URL: %{lnb_url} BugURL: %{lnb_url} License: %{lnb_lic} # group must be one of the listed in /usr/share/doc/rpm-.../GROUPS or /usr/share/rpmlint/config.d/distro.conf Group: System/Libraries #Group: System Utilities #Prefix: /usr/local Source: %{lnb_name}-%{lnb_version}.tar.gz BuildRoot: %{_tmppath}/%{name}-build BuildRequires: gcc, glibc, glibc-devel, make %description %{lnb_descr} %prep %setup -q %configure --enable-static --enable-shared --enable-public-interface %build %make_build %install %make_install %preun #sed -i 's/^.*libnetblock.so//g' /etc/ld.so.preload %post ldconfig #install-info %postun -p /sbin/ldconfig %clean %{__rm} -rf $RPM_BUILD_ROOT # define _unpackaged_files_terminate_build 0 %files %defattr(-,root,root) %{_libdir}/libnetblock.so %{_libdir}/libnetblock.so.4 %{_libdir}/libnetblock.so.4.0.0 %{_libdir}/libnetblock.la %doc %{_infodir}/libnetblock.info%_extension %doc %{_mandir}/man3/libnetblock.3%_extension %doc README %doc COPYING %doc AUTHORS %doc ChangeLog %changelog ############################################################################ %package devel Summary: %{lnb_summary} - development package Release: %{lnb_release} URL: %{lnb_url} BugURL: %{lnb_url} License: %{lnb_lic} Group: Development/C #Prefix: /usr/local Requires: %{lnb_name} = %{lnb_version} %files devel %defattr(-,root,root) %{_includedir}/libnetblock.h %{_libdir}/libnetblock.a %{_libdir}/pkgconfig/libnetblock.pc %description devel This is the development package for LibNetBlock. %{lnb_descr}