SHA256
1
0
forked from pool/parkverbot
parkverbot/parkverbot.spec
OBS User mrdocs 7263115762 Accepting request 143988 from home:sbrabec:gpg-offline-verify
Verify GPG signature: Perform build-time offline GPG verification.
Please verify that included keyring matches your needs.
For manipulation with the offline keyring, please use gpg-offline tool from openSUSE:Factory, devel-tools-building or Base:System.
See the man page and/or /usr/share/doc/packages/gpg-offline/PACKAGING.HOWTO.

If you need to build your package for older products and don't want to mess spec file with ifs, please follow PACKAGING.HOWTO:
you can link or aggregate gpg-offline from
devel:tools:building or use following trick with "osc meta prjconf":

--- Cut here ----
%if 0%{?suse_version} <= 1220
Substitute: gpg-offline
%endif

Macros:
%gpg_verify(dnf) \
%if 0%{?suse_version} > 1220\
echo "WARNING: Using %%gpg_verify macro from prjconf, not from gpg-offline package."\
gpg-offline --directory="%{-d:%{-d*}}%{!-d:%{_sourcedir}}" --package="%{-n:%{-n*}}%{!-n:%{name}}""%{-f: %{-f*}}" --verify %{**}\
%else\
echo "WARNING: Dummy prjconf macro. gpg-offline is not available, skipping %{**} GPG signature verification!"\
%endif\
%nil
-----------------

OBS-URL: https://build.opensuse.org/request/show/143988
OBS-URL: https://build.opensuse.org/package/show/utilities/parkverbot?expand=0&rev=10
2012-12-05 19:03:11 +00:00

85 lines
2.3 KiB
RPMSpec

#
# spec file for package parkverbot
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: parkverbot
Version: 1.0+git5
Release: 0
Url: http://parkverbot.sf.net/
Summary: Daemon to prevent hard disk head parking in rotational media
License: GPL-2.0+
Group: System/Base
#DL-URL: http://downloads.sf.net/parkverbot/%name-%version.tar.xz
Source: %name-%version.tar.xz
Source2: %name-%version.tar.xz.asc
Source3: %name.keyring
#BuildRequires: autoconf >= 2.60, automake >= 1.10
%if 0%{?suse_version} > 1220
BuildRequires: gpg-offline
%endif
BuildRequires: pkgconfig >= 0.23
BuildRequires: xz
%if 0%{?sles_version}
BuildRequires: libHX-devel >= 3.12
%else
BuildRequires: pkgconfig(libHX) >= 3.12
%endif
%if 0%{?suse_version} >= 1220
BuildRequires: systemd
%systemd_requires
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Modern rotational hard disks have a misfeature involving the regular
automatic unloading of the heads, measurable by the SMART attribute
"Load_Cycle_Count", that causes latency on wake-up, and while the
manufacturers sell this as "green", it is believed to cause reduced
hard disk life.
The parkverbot daemon will periodically issue small read requests in
order to keep the hardware from going to its head-unloaded idle
state.
%prep
%if 0%{?gpg_verify:1}
%gpg_verify %{S:2}
%endif
%setup -q
%build
if [ ! -e configure ]; then
autoreconf -fi;
fi;
%configure --with-unitdir="%_unitdir"
make %{?_smp_mflags};
%install
make install DESTDIR="%buildroot";
%files
%defattr(-,root,root)
%_sbindir/parkverbot
%_mandir/man*/parkverbot*
%if %{?_unitdir:1}
%_unitdir/parkverbot@.service
%endif
%doc LICENSE.GPL2
%changelog