Accepting request 73671 from home:saschpe:branches:Base:System

- Use RPM macros instead of $RPM_FOO variables
- Don't require %{version}-%{release} of the base package,
  %{version} is sufficient

OBS-URL: https://build.opensuse.org/request/show/73671
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=155
This commit is contained in:
Kay Sievers 2011-06-15 10:09:00 +00:00 committed by Git OBS Bridge
parent a0df7f1c20
commit 1501959cbf
2 changed files with 43 additions and 36 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Wed Jun 15 10:00:29 UTC 2011 - saschpe@suse.de
- Use RPM macros instead of $RPM_FOO variables
- Don't require %{version}-%{release} of the base package,
%{version} is sufficient
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jun 14 15:10:41 CEST 2011 - kay.sievers@novell.com Tue Jun 14 15:10:41 CEST 2011 - kay.sievers@novell.com

View File

@ -66,7 +66,7 @@ drop-in replacement for sysvinit.
License: GPLv2+ License: GPLv2+
Group: System/Base Group: System/Base
Summary: Graphical front-end for systemd Summary: Graphical front-end for systemd
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}
%description gtk %description gtk
Graphical front-end for systemd system and service manager. Graphical front-end for systemd system and service manager.
@ -75,7 +75,7 @@ Graphical front-end for systemd system and service manager.
License: GPLv2+ License: GPLv2+
Group: System/Base Group: System/Base
Summary: System V init tools Summary: System V init tools
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}
Provides: sbin_init Provides: sbin_init
Conflicts: sysvinit Conflicts: sysvinit
Conflicts: upstart Conflicts: upstart
@ -89,7 +89,7 @@ Drop-in replacement of System V init tools.
License: GPLv2+ License: GPLv2+
Group: System/Base Group: System/Base
Summary: Plymouth support for systemd Summary: Plymouth support for systemd
Requires: %{name} = %{version}-%{release} Requires: %{name} = %{version}
Requires: plymouth Requires: plymouth
%description plymouth %description plymouth
@ -110,48 +110,48 @@ export V=1
--with-distro=suse \ --with-distro=suse \
--docdir=%{_docdir}/systemd \ --docdir=%{_docdir}/systemd \
--with-rootdir= \ --with-rootdir= \
CFLAGS="$RPM_OPT_FLAGS" CFLAGS="%{optflags}"
# rebuild due to libnotify 0.7 in factory # rebuild due to libnotify 0.7 in factory
touch *.vala */*.vala touch *.vala */*.vala
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
%makeinstall %makeinstall
find $RPM_BUILD_ROOT -type f -name '*.la' -exec rm -f {} ';' find %{buildroot} -type f -name '*.la' -exec rm -f {} ';'
mkdir -p $RPM_BUILD_ROOT/sbin mkdir -p %{buildroot}/sbin
ln -s ../bin/systemd $RPM_BUILD_ROOT/sbin/init ln -s ../bin/systemd %{buildroot}/sbin/init
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/reboot ln -s ../bin/systemctl %{buildroot}/sbin/reboot
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/halt ln -s ../bin/systemctl %{buildroot}/sbin/halt
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/shutdown ln -s ../bin/systemctl %{buildroot}/sbin/shutdown
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/poweroff ln -s ../bin/systemctl %{buildroot}/sbin/poweroff
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/telinit ln -s ../bin/systemctl %{buildroot}/sbin/telinit
ln -s ../bin/systemctl $RPM_BUILD_ROOT/sbin/runlevel ln -s ../bin/systemctl %{buildroot}/sbin/runlevel
rm -rf $RPM_BUILD_ROOT/etc/systemd/system/*.target.wants rm -rf %{buildroot}/etc/systemd/system/*.target.wants
rm -f $RPM_BUILD_ROOT/etc/systemd/system/default.target rm -f %{buildroot}/etc/systemd/system/default.target
%if !%{build_plymouth} %if !%{build_plymouth}
rm -f $RPM_BUILD_ROOT/lib/systemd/system/plymouth-*.service rm -f %{buildroot}/lib/systemd/system/plymouth-*.service
rm -f $RPM_BUILD_ROOT/lib/systemd/system/*.wants/plymouth-*.service rm -f %{buildroot}/lib/systemd/system/*.wants/plymouth-*.service
rm -f $RPM_BUILD_ROOT/lib/systemd/system/systemd-ask-password-plymouth.* rm -f %{buildroot}/lib/systemd/system/systemd-ask-password-plymouth.*
%endif %endif
# aliases for /etc/init.d/* # aliases for /etc/init.d/*
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/cgroup.service ln -s /dev/null %{buildroot}/lib/systemd/system/cgroup.service
ln -s systemd-tmpfiles-setup.service $RPM_BUILD_ROOT/lib/systemd/system/cleanup.service ln -s systemd-tmpfiles-setup.service %{buildroot}/lib/systemd/system/cleanup.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/clock.service ln -s /dev/null %{buildroot}/lib/systemd/system/clock.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/crypto.service ln -s /dev/null %{buildroot}/lib/systemd/system/crypto.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/crypto-early.service ln -s /dev/null %{buildroot}/lib/systemd/system/crypto-early.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/earlysyslog.service ln -s /dev/null %{buildroot}/lib/systemd/system/earlysyslog.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/klog.service ln -s /dev/null %{buildroot}/lib/systemd/system/klog.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/ldconfig.service ln -s /dev/null %{buildroot}/lib/systemd/system/ldconfig.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/loadmodules.service ln -s /dev/null %{buildroot}/lib/systemd/system/loadmodules.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/localfs.service ln -s /dev/null %{buildroot}/lib/systemd/system/localfs.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/localnet.service ln -s /dev/null %{buildroot}/lib/systemd/system/localnet.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/proc.service ln -s /dev/null %{buildroot}/lib/systemd/system/proc.service
ln -s fsck-root.service $RPM_BUILD_ROOT/lib/systemd/system/rootfsck.service ln -s fsck-root.service %{buildroot}/lib/systemd/system/rootfsck.service
ln -s /dev/null $RPM_BUILD_ROOT/lib/systemd/system/swap.service ln -s /dev/null %{buildroot}/lib/systemd/system/swap.service
ln -s systemd-sysctl.service $RPM_BUILD_ROOT/lib/systemd/system/sysctl.service ln -s systemd-sysctl.service %{buildroot}/lib/systemd/system/sysctl.service
ln -s systemd-random-seed-load.service $RPM_BUILD_ROOT/lib/systemd/system/random.service ln -s systemd-random-seed-load.service %{buildroot}/lib/systemd/system/random.service
%if %{build_plymouth} %if %{build_plymouth}
(cd $RPM_BUILD_ROOT && find . -name '*plymouth*') > files.plymouth (cd %{buildroot} && find . -name '*plymouth*') > files.plymouth
%endif %endif
%post %post
@ -185,7 +185,7 @@ if [ $1 -eq 0 ]; then
fi fi
%clean %clean
rm -rf $RPM_BUILD_ROOT rm -rf %{buildroot}
%files %files
%defattr(-,root,root) %defattr(-,root,root)