packages: smartmontools/smartmontools.spec - package examples, systemd, cap...

glen glen at pld-linux.org
Tue Mar 13 10:07:46 CET 2012


Author: glen                         Date: Tue Mar 13 09:07:46 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- package examples, systemd, capng bcond

---- Files affected:
packages/smartmontools:
   smartmontools.spec (1.48 -> 1.49) 

---- Diffs:

================================================================
Index: packages/smartmontools/smartmontools.spec
diff -u packages/smartmontools/smartmontools.spec:1.48 packages/smartmontools/smartmontools.spec:1.49
--- packages/smartmontools/smartmontools.spec:1.48	Mon Feb 27 07:35:22 2012
+++ packages/smartmontools/smartmontools.spec	Tue Mar 13 10:07:40 2012
@@ -1,4 +1,21 @@
 # $Revision$, $Date$
+#
+# Conditional build:
+%if "%{pld_release}" == "ac"
+%bcond_with		capng		# build with libpcap-ng
+%bcond_with		systemd		# with systemd units
+%else
+%bcond_without	capng		# build without libpcap-ng
+%bcond_without	systemd		# without systemd units
+%endif
+
+%if %{without systemd}
+%define	systemd_post() %{nil}
+%define	systemd_preun() %{nil}
+%define	systemd_reload() %{nil}
+%define	systemd_trigger() %{nil}
+%endif
+
 Summary:	S.M.A.R.T. control and monitoring of ATA/SCSI harddisks
 Summary(cs.UTF-8):	smartmontools - pro monitorování S.M.A.R.T. disků a zařízení
 Summary(de.UTF-8):	smartmontools - zur Überwachung von S.M.A.R.T.-Platten und-Geräten
@@ -9,7 +26,7 @@
 Summary(pt.UTF-8):	smartmontools - para monitorar discos e dispositivos S.M.A.R.T.
 Name:		smartmontools
 Version:	5.42
-Release:	5
+Release:	6
 License:	GPL v2+
 Group:		Applications/System
 Source0:	http://downloads.sourceforge.net/smartmontools/%{name}-%{version}.tar.gz
@@ -20,12 +37,13 @@
 URL:		http://smartmontools.sourceforge.net/
 BuildRequires:	autoconf
 BuildRequires:	automake
-BuildRequires:	libcap-ng-devel
+%{?with_capng:BuildRequires:	libcap-ng-devel}
 BuildRequires:	libstdc++-devel
+BuildRequires:	rpm >= 4.4.9-56
 BuildRequires:	rpmbuild(macros) >= 1.626
 Requires(post,preun):	/sbin/chkconfig
 Requires:	rc-scripts >= 0.4.3.0
-Requires:	systemd-units >= 37-0.10
+%{?with_systemd:Requires:	systemd-units >= 37-0.10}
 Obsoletes:	smartctl
 Obsoletes:	smartmontools-systemd
 Obsoletes:	smartsuite
@@ -154,14 +172,15 @@
 %{__autoheader}
 %{__automake}
 %configure \
-	--with-libcap-ng=yes
+	%{?with_capng:--with-libcap-ng=yes}
 
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 %{__make} install \
+	docs_DATA= \
+	examplesdir=%{_examplesdir}/%{name}-%{version} \
 	DESTDIR=$RPM_BUILD_ROOT
 
 install -d $RPM_BUILD_ROOT{/etc/{rc.d/init.d,init},/lib/systemd/system}
@@ -169,7 +188,7 @@
 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/init/smartd.conf
 cp -p %{SOURCE3} $RPM_BUILD_ROOT/lib/systemd/system
 
-sed -e 's#^/dev/#\#/dev/#g' smartd.conf > $RPM_BUILD_ROOT%{_sysconfdir}/smartd.conf
+sed -e 's,^/dev/,#&,' smartd.conf > $RPM_BUILD_ROOT%{_sysconfdir}/smartd.conf
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -195,14 +214,15 @@
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS CHANGELOG NEWS README TODO WARNINGS
-%attr(755,root,root) %{_sbindir}/smartctl
-%attr(755,root,root) %{_sbindir}/smartd
-%attr(755,root,root) %{_sbindir}/update-smart-drivedb
 %attr(754,root,root) /etc/rc.d/init.d/smartd
 %config(noreplace) %verify(not md5 mtime size) /etc/init/smartd.conf
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/smartd.conf
+%attr(755,root,root) %{_sbindir}/smartctl
+%attr(755,root,root) %{_sbindir}/smartd
+%attr(755,root,root) %{_sbindir}/update-smart-drivedb
 /lib/systemd/system/smartd.service
 %{_datadir}/smartmontools
+%{_examplesdir}/%{name}-%{version}
 %{_mandir}/man5/smartd.conf.5*
 %{_mandir}/man8/smartctl.8*
 %{_mandir}/man8/smartd.8*
@@ -213,6 +233,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.49  2012/03/13 09:07:40  glen
+- package examples, systemd, capng bcond
+
 Revision 1.48  2012/02/27 06:35:22  wiget
 - fix c&p bug in %triggerpostun
 - rel. 5
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/smartmontools/smartmontools.spec?r1=1.48&r2=1.49&f=u



More information about the pld-cvs-commit mailing list