File suseRegister.spec of Package suseRegister
#
# spec file for package suseRegister (Version 1.4)
#
# Copyright (c) 2010 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/
#
# norootforbuild
Name: suseRegister
Version: 1.4
Release: 8
Summary: Registration Tool
Group: Productivity/Other
License: GPLv2+
Source: %{name}-%{version}.tar.bz2
Source1: cron_suse_register
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#Requires: curl
Requires: perl = %{perl_version}
Requires: perl-XML-Parser
Requires: perl-XML-Writer
Requires: perl-URI
Requires: perl-WWW-Curl
Requires: uuid-runtime
Requires: coreutils
Requires: util-linux
Requires: sysconfig
Requires: hwinfo
Requires: zypper >= 0.12.6
Requires: cron
Requires: distribution-release
BuildRequires: perl
PreReq: coreutils
BuildArch: noarch
%description
Command line tool for registering Novell and SUSE products.
Authors:
--------
Michael Calmer <Michael.Calmer@novell.com>
%prep
%setup -q
%build
%install
mkdir -p $RPM_BUILD_ROOT/var/lib/suseRegister/
mkdir -p $RPM_BUILD_ROOT/usr/lib/suseRegister/bin
make DESTDIR=$RPM_BUILD_ROOT BINDIR=%{_bindir} SYSCONFIGDIR=%{_sysconfdir} install
install -m 755 %{S:1} $RPM_BUILD_ROOT/usr/lib/suseRegister/bin
# touching the ghost
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/
touch $RPM_BUILD_ROOT/%{_sysconfdir}/cron.d/novell.com-suse_register
%post
if [ ! -s /etc/cron.d/novell.com-suse_register ]; then
date +"%M %H %d * * root /usr/lib/suseRegister/bin/cron_suse_register" > %{_sysconfdir}/cron.d/novell.com-suse_register
fi
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-, root, root)
%doc COPYING COPYRIGHT.english README
%config %{_sysconfdir}/*.conf
%dir /usr/lib/suseRegister
%dir /usr/lib/suseRegister/bin
%{perl_vendorlib}/SUSE
%{_bindir}/*
%dir /var/lib/suseRegister
%ghost %{_sysconfdir}/cron.d/novell.com-suse_register
/usr/lib/suseRegister/bin/*
%changelog