Accepting request 245573 from home:lnussel:branches:Base:System

- use systemd-rpm-macros instead of systemd-devel to avoid build
  dependency on systemd and it's deps in turn
- install rcpowerd link also when using systemd

- use systemd-rpm-macros instead of systemd-devel to avoid build
  dependency on systemd and it's deps in turn
- don't install mkinitrd stuff on > 131 anymore

OBS-URL: https://build.opensuse.org/request/show/245573
OBS-URL: https://build.opensuse.org/package/show/Base:System/sysvinit?expand=0&rev=206
This commit is contained in:
Dr. Werner Fink 2014-08-21 12:33:30 +00:00 committed by Git OBS Bridge
parent 307e30a31b
commit 05ae771b77
4 changed files with 50 additions and 14 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Aug 21 11:38:06 UTC 2014 - lnussel@suse.de
- use systemd-rpm-macros instead of systemd-devel to avoid build
dependency on systemd and it's deps in turn
- install rcpowerd link also when using systemd
-------------------------------------------------------------------
Thu Mar 13 14:10:35 UTC 2014 - werner@suse.de

View File

@ -29,9 +29,13 @@ License: GPL-2.0+
Group: System/Base
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1140
%if 0%{?suse_version} > 1230
BuildRequires: systemd-rpm-macros
%else
BuildRequires: pkg-config
BuildRequires: systemd-devel
%endif
%endif
Url: https://power.sourceforge.net/
Source0: powerd-%{version}.tar.bz2
Source1: rc.powerd
@ -39,8 +43,9 @@ Source2: powerd.service
Patch0: powerd-%{version}.dif
Patch1: powerd-%{version}-getaddrinfo.patch
%if %{without sysvinit}
%{expand: %%global sysdsysunitdir %(pkg-config systemd --variable=systemdsystemunitdir)}
%{expand: %%global sysdsysconfdir %(pkg-config systemd --variable=systemdsystemconfdir)}
%if %{undefined _unitdir}
%{expand: %%global %_unitdir %(pkg-config systemd --variable=systemdsystemunitdir)}
%endif
%endif
%description -n powerd
@ -68,6 +73,7 @@ than a specified number of minutes.
%install
mkdir -m 755 -p %{buildroot}/etc
mkdir -m 755 -p %{buildroot}/sbin
mkdir -m 755 -p %{buildroot}%{_sbindir}
mkdir -m 755 -p %{buildroot}%{_mandir}/man8
make install DESTDIR=%{buildroot}
echo '# ' > %{buildroot}/etc/powerd.conf
@ -81,12 +87,13 @@ than a specified number of minutes.
echo '# rcpowerd start' >> %{buildroot}/etc/powerd.conf
mkdir -p %{buildroot}/etc/init.d
install -m 0744 %{S:1} %{buildroot}/etc/init.d/powerd
ln -sf /etc/init.d/powerd %{buildroot}/sbin/rcpowerd
ln -sf /etc/init.d/powerd %{buildroot}%{_sbindir}/rcpowerd
%else
echo '# systemctl enable powerd.service' >> %{buildroot}/etc/powerd.conf
echo '# systemctl start powerd.service' >> %{buildroot}/etc/powerd.conf
mkdir -p %{buildroot}/%{sysdsysunitdir}
install -m 0644 %{S:2} %{buildroot}/%{sysdsysunitdir}/powerd.service
mkdir -p %{buildroot}/%{_unitdir}
install -m 0644 %{S:2} %{buildroot}/%{_unitdir}/powerd.service
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcpowerd
%endif
%preun
@ -103,14 +110,12 @@ than a specified number of minutes.
%doc README COPYING SUPPORTED FAQ powerd.conf.monitor powerd.conf.peer
/sbin/powerd
/sbin/detectups
%if %{with sysvinit}
/sbin/rcpowerd
%endif
%{_sbindir}/rcpowerd
%config /etc/powerd.conf
%if %{with sysvinit}
%config /etc/init.d/powerd
%else
%attr(0644,root,root) %{sysdsysunitdir}/powerd.service
%attr(0644,root,root) %{_unitdir}/powerd.service
%endif
%doc %{_mandir}/man8/powerd.8.gz
%doc %{_mandir}/man8/detectups.8.gz

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Aug 21 11:38:06 UTC 2014 - lnussel@suse.de
- use systemd-rpm-macros instead of systemd-devel to avoid build
dependency on systemd and it's deps in turn
- don't install mkinitrd stuff on > 131 anymore
-------------------------------------------------------------------
Wed May 28 07:11:58 UTC 2014 - werner@suse.de

View File

@ -25,6 +25,12 @@
%endif
%bcond_with sysvinit
%if 0%{?suse_version} > 1310
%define have_mkinitrd 0
%else
%define have_mkinitrd 1
%endif
Name: sysvinit
%define KPVER 2.21
%define SCVER 1.16
@ -41,12 +47,19 @@ BuildRequires: libselinux-devel
BuildRequires: libsepol-devel
BuildRequires: pam-devel
%if 0%{?suse_version} > 1140
%if 0%{?suse_version} > 1230
BuildRequires: systemd-rpm-macros
%else
BuildRequires: pkg-config
BuildRequires: systemd-devel
%endif
%endif
#!BuildIgnore: sysvinit-tools
Requires(post): coreutils grep mkinitrd
Requires(post): coreutils grep
%if %have_mkinitrd
Requires(post): mkinitrd
Requires(postun): mkinitrd
%endif
Url: http://savannah.nongnu.org/projects/sysvinit/
Source: sysvinit-%{SIVER}dsf.tar.bz2
Source2: killproc-%{KPVER}.tar.bz2
@ -80,10 +93,6 @@ Patch42: showconsole-1.16-glibc.dif
Patch50: startpar-%{START}.dif
Requires: mingetty
Requires: sysvinit-tools
%if %{without sysvinit}
%{expand: %%global sysdsysunitdir %(pkg-config systemd --variable=systemdsystemunitdir)}
%{expand: %%global sysdsysconfdir %(pkg-config systemd --variable=systemdsystemconfdir)}
%endif
%description
System V style init programs by Miquel van Smoorenburg that control the
@ -212,10 +221,12 @@ popd
#
# Install mkinitrd scriptlets
#
%if %have_mkinitrd
install -d %{buildroot}/lib/mkinitrd/scripts
install -m 0755 %{SOURCE8} %{buildroot}/lib/mkinitrd/scripts/boot-blogd.sh
install -m 0755 %{SOURCE9} %{buildroot}/lib/mkinitrd/scripts/boot-killblogd.sh
install -m 0755 %{SOURCE10} %{buildroot}/lib/mkinitrd/scripts/boot-killblogd2.sh
%endif
#
# Remove files not packed:
#
@ -245,15 +256,19 @@ if test -x /sbin/telinit -a -p /dev/initctl -a -f /proc/1/exe -a -d /proc/1/root
ret=1
fi
fi
%if %have_mkinitrd
if test -x /sbin/mkinitrd_setup; then
mkinitrd_setup
fi
%endif
exit $ret
%if %have_mkinitrd
%postun
if test -x /sbin/mkinitrd_setup; then
mkinitrd_setup
fi
%endif
%files
%defattr (-,root,root,755)
@ -280,11 +295,13 @@ fi
%doc %{_mandir}/man8/runlevel.8.gz
%doc %{_mandir}/man8/shutdown.8.gz
%doc %{_mandir}/man8/telinit.8.gz
%if %have_mkinitrd
%dir /lib/mkinitrd
%dir /lib/mkinitrd/scripts
/lib/mkinitrd/scripts/boot-blogd.sh
/lib/mkinitrd/scripts/boot-killblogd.sh
/lib/mkinitrd/scripts/boot-killblogd2.sh
%endif
%files tools
%defattr (-,root,root,755)