Accepting request 335655 from home:sleep_walker:branches:system:packagemanager
- use pkgconfig dependencies - clean-up with spec-cleaner - force installation of service file to %{_unitdir} - use systemd related code only when systemd is available in distro - bump to 0.8.3 - a lot of changes on package management level, package set level, distribution level and numerous bug fixed - remove our service file and use upstream one instead OBS-URL: https://build.opensuse.org/request/show/335655 OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/guix?expand=0&rev=4
This commit is contained in:
committed by
Git OBS Bridge
parent
7ea4d02f4e
commit
460caabcec
46
guix.spec
46
guix.spec
@@ -15,10 +15,12 @@
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
# if there is systemd present, systemd_requires is defined
|
||||
%define systemd_present %{defined systemd_requires}
|
||||
%define guile guile-2.0.9.tar.xz
|
||||
|
||||
Name: guix
|
||||
Version: 0.8.2
|
||||
Version: 0.8.3
|
||||
Release: 0
|
||||
Summary: GNU Package manager
|
||||
License: GPL-3.0
|
||||
@@ -36,26 +38,30 @@ Source4: x86_64-linux-%{guile}
|
||||
Source5: mips64el-linux-%{guile}
|
||||
# http://alpha.gnu.org/gnu/guix/bootstrap/armhf-linux/20150101/guile-2.0.11.tar.xz
|
||||
Source6: armhf-linux-guile-2.0.11.tar.xz
|
||||
Source10: guixd.service
|
||||
#Source10: guixd.service
|
||||
Source11: sysconfig.guix
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: guile-devel
|
||||
BuildRequires: libbz2-devel
|
||||
BuildRequires: libgcrypt-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: sqlite3-devel
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: pkgconfig(bzip2)
|
||||
BuildRequires: pkgconfig(guile-2.0) >= 2.0.7
|
||||
BuildRequires: pkgconfig(sqlite3)
|
||||
Requires: guile
|
||||
Requires: libgcrypt-devel
|
||||
Requires(pre): %{install_info_prereq}
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{?systemd_requires}
|
||||
%if %{systemd_present}
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%endif
|
||||
|
||||
%description
|
||||
Purely functional package manager and a distribution thereof.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
# install service file to _unitdir
|
||||
sed -i 's@\$(libdir)/systemd/system@%{_unitdir}@' Makefile.in
|
||||
mkdir -p gnu/packages/bootstrap/{i686,x86_64,mips64el,armhf}-linux
|
||||
cp %{SOURCE3} gnu/packages/bootstrap/i686-linux/%{guile}
|
||||
cp %{SOURCE4} gnu/packages/bootstrap/x86_64-linux/%{guile}
|
||||
@@ -74,11 +80,12 @@ make %{?_smp_mflags}
|
||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||
%find_lang %{name}
|
||||
%find_lang guix-packages
|
||||
install -d -m 0755 %{buildroot}%{_unitdir}
|
||||
install -D -m 0644 -t %{buildroot}%{_unitdir} %{SOURCE10}
|
||||
install -d -m 0755 %{buildroot}%{_localstatedir}/adm/fillup-templates/
|
||||
install -D -m 0644 -t %{buildroot}%{_localstatedir}/adm/fillup-templates/ %{SOURCE11}
|
||||
rm %{buildroot}%{_infodir}/dir
|
||||
%if ! %{systemd_present}
|
||||
rm -rvf %{buildroot}%{_unitdir}
|
||||
%endif
|
||||
|
||||
%pre
|
||||
%{_sbindir}/groupadd -r guix-builders >/dev/null 2>/dev/null || :
|
||||
@@ -86,20 +93,26 @@ for i in `seq 1 5`; do
|
||||
%{_sbindir}/useradd -r -o -g guix-builders -G guix-builders -u $((60+$i)) -c "Guix builder $i" \
|
||||
-s /sbin/nologin -d %{_localstatedir}/empty guix-builder$i 2> /dev/null || :
|
||||
done
|
||||
%service_add_pre guixd.service
|
||||
%if %{systemd_present}
|
||||
%service_add_pre guix-daemon.service
|
||||
|
||||
%preun
|
||||
%service_del_preun guixd.service
|
||||
%service_del_preun guix-daemon.service
|
||||
%endif
|
||||
|
||||
|
||||
%post
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/guix.info.gz
|
||||
%service_add_post guixd.service
|
||||
%{fillup_only guixd}
|
||||
%if %{systemd_present}
|
||||
%service_add_post guix-daemon.service
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/guix.info.gz
|
||||
%service_del_postun guixd.service
|
||||
|
||||
%if %{systemd_present}
|
||||
%service_del_postun guix-daemon.service
|
||||
%endif
|
||||
|
||||
%files -f %{name}.lang -f guix-packages.lang
|
||||
%defattr(-,root,root)
|
||||
@@ -113,7 +126,10 @@ done
|
||||
%{_libexecdir}/guix-authenticate
|
||||
%{_infodir}/guix*
|
||||
%{_infodir}/images
|
||||
%{_unitdir}/guixd.service
|
||||
%if %{systemd_present}
|
||||
%{_unitdir}/guix*.service
|
||||
%endif
|
||||
%{_mandir}/man1/guix*
|
||||
%{_localstatedir}/adm/fillup-templates/*
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user