Accepting request 284122 from home:sleep_walker:guix
changes since last attempt - used spec-cleaner to make spec file even more beautiful OBS-URL: https://build.opensuse.org/request/show/284122 OBS-URL: https://build.opensuse.org/package/show/system:packagemanager/guix?expand=0&rev=1
This commit is contained in:
113
guix.spec
Normal file
113
guix.spec
Normal file
@@ -0,0 +1,113 @@
|
||||
#
|
||||
# spec file for package guix
|
||||
#
|
||||
# Copyright (c) 2015 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/
|
||||
#
|
||||
|
||||
|
||||
%define guile guile-2.0.9.tar.xz
|
||||
Name: guix
|
||||
Version: 0.8.1
|
||||
Release: 0
|
||||
Summary: GNU Package manager
|
||||
License: GPL-3.0
|
||||
Group: System/Packages
|
||||
Url: http://www.gnu.org/software/guix/
|
||||
Source0: ftp://alpha.gnu.org/gnu/guix/%{name}-%{version}.tar.gz
|
||||
# source file renamed - this would lead to 3 same file names
|
||||
# http://alpha.gnu.org/gnu/guix/bootstrap/i686-linux/20131110/%%{guile}
|
||||
Source1: i686-linux-%{guile}
|
||||
# http://alpha.gnu.org/gnu/guix/bootstrap/x86_64-linux/20131110/%%{guile}
|
||||
Source2: x86_64-linux-%{guile}
|
||||
# http://alpha.gnu.org/gnu/guix/bootstrap/mips64el-linux/20131110/%%{guile}
|
||||
Source3: mips64el-linux-%{guile}
|
||||
# http://alpha.gnu.org/gnu/guix/bootstrap/armhf-linux/20150101/guile-2.0.11.tar.xz
|
||||
Source4: armhf-linux-guile-2.0.11.tar.xz
|
||||
Source10: guixd.service
|
||||
Source11: sysconfig.guix
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: guile-devel
|
||||
BuildRequires: libbz2-devel
|
||||
BuildRequires: libgcrypt-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: sqlite3-devel
|
||||
Requires: guile
|
||||
Requires: libgcrypt-devel
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
Purely functional package manager and a distribution thereof.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
mkdir -p gnu/packages/bootstrap/{i686,x86_64,mips64el,armhf}-linux
|
||||
cp %{SOURCE1} gnu/packages/bootstrap/i686-linux/%{guile}
|
||||
cp %{SOURCE2} gnu/packages/bootstrap/x86_64-linux/%{guile}
|
||||
cp %{SOURCE3} gnu/packages/bootstrap/mips64el-linux/%{guile}
|
||||
cp %{SOURCE4} gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz
|
||||
|
||||
|
||||
%build
|
||||
|
||||
%configure \
|
||||
--disable-silent-rules
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
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
|
||||
|
||||
%pre
|
||||
%{_sbindir}/groupadd -r guix-builders >/dev/null 2>/dev/null || :
|
||||
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
|
||||
|
||||
%preun
|
||||
%service_del_preun guixd.service
|
||||
|
||||
%post
|
||||
%install_info --info-dir=%{_infodir} %{_infodir}/guix.info.gz
|
||||
%service_add_post guixd.service
|
||||
%{fillup_only guixd}
|
||||
|
||||
%postun
|
||||
%install_info_delete --info-dir=%{_infodir} %{_infodir}/guix.info.gz
|
||||
%service_del_postun guixd.service
|
||||
|
||||
|
||||
%files -f %{name}.lang -f guix-packages.lang
|
||||
%defattr(-,root,root)
|
||||
%doc COPYING README
|
||||
%{_datadir}/guile
|
||||
%{_datadir}/guix
|
||||
%{_bindir}/guix*
|
||||
%{_sbindir}/guix*
|
||||
%{_libexecdir}/guix
|
||||
%{_libexecdir}/guix-authenticate
|
||||
%{_infodir}/guix*
|
||||
%{_infodir}/images
|
||||
%{_unitdir}/guixd.service
|
||||
%{_localstatedir}/adm/fillup-templates/*
|
||||
|
||||
%changelog
|
Reference in New Issue
Block a user