[kismet] Spec cleanup.

Jon Ciesla limb at fedoraproject.org
Thu Mar 7 19:02:22 UTC 2013


commit d812e76d7f633772e89ac21be5863f1bd7cfd35a
Author: Jon Ciesla <limburgher at gmail.com>
Date:   Thu Mar 7 12:58:58 2013 -0600

    Spec cleanup.

 kismet.spec |   59 +++++++++++++++++++++++++++++++----------------------------
 1 files changed, 31 insertions(+), 28 deletions(-)
---
diff --git a/kismet.spec b/kismet.spec
index 31c5e89..673df5c 100644
--- a/kismet.spec
+++ b/kismet.spec
@@ -5,19 +5,18 @@
 %global _rpmversion	0.0.%(echo %_version | tr - .)
 ## ...local macros}
 
-%{!?release_func:%global release_func() %1%{?dist}}
 %{!?apply:%global  apply(p:n:b:) %patch%%{-n:%%{-n*}} %%{-p:-p%%{-p*}} %%{-b:-b%%{-b*}} \
 %nil}
 
 Summary:	WLAN detector, sniffer and IDS
 Name:		kismet
 Version:	%_rpmversion
-Release:	%release_func 1604
+Release:	1605%{?dist}
 License:	GPLv2+
 Group:		Applications/Internet
 URL:		http://www.kismetwireless.net/
-Source0:	http://www.kismetwireless.net/code/%name-%_version.tar.gz
-Source1:	http://www.kismetwireless.net/code/%name-%_version.tar.gz.asc
+Source0:	http://www.kismetwireless.net/code/%{name}-%_version.tar.gz
+Source1:	http://www.kismetwireless.net/code/%{name}-%_version.tar.gz.asc
 
 Source12:	kismet_capture.pam
 Source13:	kismet_capture.console
@@ -25,7 +24,7 @@ Source13:	kismet_capture.console
 Patch17:	kismet-2009-06-R1-perms.patch
 Patch18:	kismet-2009-06-R1-envp.patch
 
-BuildRoot:	%_tmppath/%name-%version-%release-root
+BuildRoot:	%_tmppath/%{name}-%{version}-%{release}-root
 BuildRequires:	ncurses-devel diffutils
 BuildRequires:	libpcap-devel pcre-devel
 BuildRequires:	openssl-devel libcap-devel libnl-devel
@@ -35,13 +34,12 @@ Obsoletes:	kismet-extras < 0.0.2009.06.R1
 
 # HACK: work around https://fedorahosted.org/usermode/ticket/1
 Source50:	kismet_capture_wrap.c
-BuildRequires:	dietlibc
 
 
 %package plugins
 Summary:	Plugins for kismet
 Group:		Applications/Internet
-Requires:	%name = %version-%release
+Requires:	%{name} = %{version}-%{release}
 
 
 %description
@@ -65,16 +63,16 @@ This subpackage contains plugins shipped by the kismet package.
 
 
 %prep
-%setup -q -n %name-%_version
+%setup -q -n %{name}-%_version
 %apply -n17 -p1
 %apply -n18 -p1
 
 /bin/cp -a /usr/lib/rpm/config.sub .
 
-sed -i 's!\$(prefix)/lib/!%_libdir/!g' plugin-*/Makefile
+sed -i 's!\$(prefix)/lib/!%{_libdir}/!g' plugin-*/Makefile
 
 
-# set our 'kismet' user, disable GPS and log into %logdir by
+# set our 'kismet' user, disable GPS and log into %%logdir by
 # default
 sed -i \
     -e '\!^ouifile=/etc/manuf!d' \
@@ -86,6 +84,7 @@ sed -i \
 #export ac_cv_header_linux_netlink_h=yes	# we have netlink.h; just the check is buggy
 export ac_cv_lib_uClibcpp_main=no	# we do not want to build against uClibc++, even when available
 export LDFLAGS='-Wl,--as-needed'
+export LIBS='-lpthread'
 %configure \
 	   --sysconfdir=%cfgdir \
 	   CXXFLAGS="$RPM_OPT_FLAGS -D__STDC_FORMAT_MACROS"
@@ -103,7 +102,7 @@ done
 
 
 # HACK: work around https://fedorahosted.org/usermode/ticket/1
-diet %__cc $RPM_OPT_FLAGS %SOURCE50 -o kismet_capture.wrap
+%__cc $RPM_OPT_FLAGS %SOURCE50 -o kismet_capture.wrap
 
 
 %install
@@ -116,17 +115,17 @@ for i in . plugin-{ptw,spectools,autowep}; do
 	INSTUSR="$(id -un)" INSTGRP="$(id -gn)" MANGRP="$(id -gn)"
 done
 
-install -d $RPM_BUILD_ROOT{%homedir,%crontabdir,%_libdir/kismet{,_client},%_libexecdir,%_sysconfdir/{sysconfig,pam.d,security/console.apps}}
+install -d $RPM_BUILD_ROOT{%homedir,%crontabdir,%{_libdir}/kismet{,_client},%{_libexecdir},%{_sysconfdir}/{sysconfig,pam.d,security/console.apps}}
 
-install -p -m 0644 %SOURCE12     $RPM_BUILD_ROOT%_sysconfdir/pam.d/kismet_capture
-install -p -m 0644 %SOURCE13     $RPM_BUILD_ROOT%_sysconfdir/security/console.apps/kismet_capture
-install -p -m 0755 kismet_capture $RPM_BUILD_ROOT%_libexecdir/
+install -p -m 0644 %SOURCE12     $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/kismet_capture
+install -p -m 0644 %SOURCE13     $RPM_BUILD_ROOT%{_sysconfdir}/security/console.apps/kismet_capture
+install -p -m 0755 kismet_capture $RPM_BUILD_ROOT%{_libexecdir}/
 
-chmod 0755 $RPM_BUILD_ROOT%_libdir/kismet*/*.so
+chmod 0755 $RPM_BUILD_ROOT%{_libdir}/kismet*/*.so
 
 
-#ln -s ./consolehelper            $RPM_BUILD_ROOT%_bindir/kismet_capture
-install -p -m 0755 kismet_capture.wrap $RPM_BUILD_ROOT%_bindir/kismet_capture
+#ln -s ./consolehelper            $RPM_BUILD_ROOT%{_bindir}/kismet_capture
+install -p -m 0755 kismet_capture.wrap $RPM_BUILD_ROOT%{_bindir}/kismet_capture
 
 
 %clean
@@ -138,25 +137,29 @@ rm -rf $RPM_BUILD_ROOT
 %doc CHANGELOG* GPL README docs
 %dir %attr(0755,root,root) %cfgdir
 %config(noreplace) %cfgdir/*
-%_bindir/kismet*
-%_datadir/kismet
-%_mandir/*/kismet*
+%{_bindir}/kismet*
+%{_datadir}/kismet
+%{_mandir}/*/kismet*
 
-%dir %_libdir/kismet
-%dir %_libdir/kismet_client
+%dir %{_libdir}/kismet
+%dir %{_libdir}/kismet_client
 
-%config(noreplace) %_sysconfdir/pam.d/*
-%_sysconfdir/security/console.apps/*
-%_libexecdir/*
+%config(noreplace) %{_sysconfdir}/pam.d/*
+%{_sysconfdir}/security/console.apps/*
+%{_libexecdir}/*
 
 
 %files plugins
 %defattr(-,root,root,-)
-%_libdir/kismet/*.so
-%_libdir/kismet_client/*.so
+%{_libdir}/kismet/*.so
+%{_libdir}/kismet_client/*.so
 
 
 %changelog
+* Fri Mar 01 2013 Jon Ciesla <limburgher at gmail.com> - 0.0.2011.03.R2-1605
+- Spec cleanup.
+- Switch from dietlibc to glibc.
+
 * Thu Feb 14 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.0.2011.03.R2-1604
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 


More information about the scm-commits mailing list