c971c4b9db
bump version to 0.15 We needed to add some patches because the release tarball misses them. I'll remove them at next release. I did extensive testing on Tumbleweed and Leap 15.0 which can be found here: https://etherpad.opensuse.org/p/guix-0.15 There is still some stuff which doesn't work as expected, but only small things. No showstoppers. I'll improve them peu a peu :) OBS-URL: https://build.opensuse.org/request/show/622310 OBS-URL: https://build.opensuse.org/package/show/devel:languages:misc/guix?expand=0&rev=22
178 lines
6.5 KiB
RPMSpec
178 lines
6.5 KiB
RPMSpec
#
|
|
# spec file for package guix
|
|
#
|
|
# Copyright (c) 2018 SUSE LINUX 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
|
|
%define guix_builder_group guixbuild
|
|
Name: guix
|
|
Version: 0.15.0
|
|
Release: 0
|
|
Summary: GNU Package manager
|
|
License: GPL-3.0-only
|
|
Group: System/Packages
|
|
Url: http://www.gnu.org/software/guix/
|
|
Source0: ftp://alpha.gnu.org/gnu/guix/%{name}-%{version}.tar.gz
|
|
Source1: ftp://alpha.gnu.org/gnu/guix/%{name}-%{version}.tar.gz.sig
|
|
Source2: %{name}.keyring
|
|
# source file renamed - this would lead to 3 same file names
|
|
# http://alpha.gnu.org/gnu/guix/bootstrap/i686-linux/20131110/%%{guile}
|
|
Source3: i686-linux-%{guile}
|
|
# http://alpha.gnu.org/gnu/guix/bootstrap/x86_64-linux/20131110/%%{guile}
|
|
Source4: x86_64-linux-%{guile}
|
|
# http://alpha.gnu.org/gnu/guix/bootstrap/mips64el-linux/20131110/%%{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: guix-rpmlintrc
|
|
Source11: armhf-linux-guile-2.0.11.tar.xz.sig
|
|
# http://alpha.gnu.org/gnu/guix/bootstrap/aarch64-linux/20170217/guile-2.0.14.tar.xz
|
|
Source12: aarch64-linux-guile-2.0.14.tar.xz
|
|
Source13: aarch64-linux-guile-2.0.14.tar.xz.sig
|
|
Source20: run_guix_daemon.sh
|
|
Source21: run_guix_publish.sh
|
|
# In the release tarball these two patches missing, leading to errors in guix weather
|
|
# and guix challenge. Upstream: 57ac5261fec345b16cf80f87aa03212abc2c5a11
|
|
Source30: perl-text-markdown-discount-unbundle.patch
|
|
Source31: racket-fix-xform-issue.patch
|
|
Patch0: 0001-gnu-local.mk-Add-missing-patches.patch
|
|
BuildRequires: gcc-c++
|
|
BuildRequires: gnutls-guile
|
|
BuildRequires: guile-charting
|
|
BuildRequires: guile-devel >= 2.0
|
|
BuildRequires: guile-git
|
|
BuildRequires: guile-json
|
|
BuildRequires: guile-sqlite3
|
|
BuildRequires: guile-ssh-devel
|
|
# this is actually just to make guile-git working
|
|
BuildRequires: libgcrypt-devel
|
|
BuildRequires: libgit2-devel
|
|
BuildRequires: pkgconfig
|
|
BuildRequires: shepherd
|
|
BuildRequires: systemd-rpm-macros
|
|
BuildRequires: pkgconfig(bzip2)
|
|
BuildRequires: pkgconfig(gnutls)
|
|
BuildRequires: pkgconfig(sqlite3)
|
|
# Needed for creating the Makefile including the two missing patches
|
|
BuildRequires: automake
|
|
BuildRequires: help2man
|
|
BuildRequires: makeinfo
|
|
Requires: gnutls-guile
|
|
Requires: guile
|
|
Requires: guile-json
|
|
Requires: guile-sqlite3
|
|
Requires: guile-ssh-devel
|
|
Requires: libgcrypt-devel
|
|
Requires: libguile-ssh11
|
|
Requires(pre): %{install_info_prereq}
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
ExclusiveArch: %{ix86} x86_64 armv7hl aarch64
|
|
|
|
%description
|
|
Purely functional package manager and a distribution thereof.
|
|
|
|
%prep
|
|
%setup -q
|
|
# Create the Makefile including two missing patches
|
|
%patch0 -p1
|
|
./bootstrap
|
|
# 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}
|
|
cp %{SOURCE5} gnu/packages/bootstrap/mips64el-linux/%{guile}
|
|
cp %{SOURCE6} gnu/packages/bootstrap/armhf-linux/guile-2.0.11.tar.xz
|
|
cp %{SOURCE12} gnu/packages/bootstrap/aarch64-linux/guile-2.0.14.tar.xz
|
|
# copy the patches to correct location
|
|
cp %{SOURCE30} gnu/packages/patches
|
|
cp %{SOURCE31} gnu/packages/patches
|
|
|
|
%build
|
|
export GUILE_WARN_DEPRECATED
|
|
%configure \
|
|
--disable-silent-rules \
|
|
--with-bash-completion-dir=%{_datadir}/bash-completion/completions
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
%make_install
|
|
%find_lang %{name}
|
|
%find_lang guix-packages
|
|
rm %{buildroot}%{_infodir}/dir
|
|
install -d -m 0755 %{buildroot}/gnu
|
|
install -d -m 0755 %{buildroot}/gnu/store
|
|
# only systemd is used, so upstart files are not needed
|
|
rm -rvf %{buildroot}%{_libdir}/upstart
|
|
install -m 0755 -t %{buildroot}%{_bindir} %{SOURCE20}
|
|
install -m 0755 -t %{buildroot}%{_bindir} %{SOURCE21}
|
|
sed -i 's@^ExecStart=.*@ExecStart=/usr/bin/run_guix_daemon.sh@' %{buildroot}%{_unitdir}/guix-daemon.service
|
|
sed -i 's@^ExecStart=.*@ExecStart=/usr/bin/run_guix_publish.sh@' %{buildroot}%{_unitdir}/guix-publish.service
|
|
# RPM throws error, due to be a development file. It's needed for guix pack -R. Disable it for now
|
|
rm %{buildroot}%{_datadir}/guile/site/2.0/gnu/packages/aux-files/run-in-namespace.c
|
|
|
|
%pre
|
|
%{_sbindir}/groupadd -r %{guix_builder_group} >/dev/null 2>/dev/null || :
|
|
for i in `seq 1 5`; do
|
|
%{_sbindir}/useradd -r -o -g %{guix_builder_group} -G %{guix_builder_group} \
|
|
-u $((60+$i)) -c "Guix builder $i" -s /sbin/nologin \
|
|
-d %{_localstatedir}/empty guix-builder$i 2> /dev/null || :
|
|
done
|
|
%service_add_pre guix-daemon.service
|
|
%service_add_pre guix-publish.service
|
|
|
|
%preun
|
|
%service_del_preun guix-daemon.service
|
|
%service_del_preun guix-publish.service
|
|
|
|
%post
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/guix.info.gz
|
|
%service_add_post guix-daemon.service
|
|
%service_add_post guix-publish.service
|
|
# Authorize official key of Guix build farm to enable binary substitutes
|
|
guix archive --authorize < %{_datadir}/guix/hydra.gnu.org.pub
|
|
|
|
%postun
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/guix.info.gz
|
|
%service_del_postun guix-daemon.service
|
|
%service_del_postun guix-publish.service
|
|
|
|
%files -f %{name}.lang -f guix-packages.lang
|
|
%defattr(-,root,root)
|
|
%license COPYING
|
|
%doc README NEWS
|
|
%{_bindir}/*guix*
|
|
%{_datadir}/bash-completion
|
|
%dir %{_datadir}/fish
|
|
%dir %{_datadir}/fish/vendor_completions.d
|
|
%{_datadir}/fish/vendor_completions.d/guix.fish
|
|
%{_datadir}/guile
|
|
%{_datadir}/guix
|
|
%dir %{_datadir}/selinux
|
|
%{_datadir}/selinux/guix-daemon.cil
|
|
%{_datadir}/zsh
|
|
%{_infodir}/guix*
|
|
%{_infodir}/images
|
|
%{_libdir}/guile/*
|
|
%{_libexecdir}/guix
|
|
%{_libexecdir}/guix-authenticate
|
|
%{_mandir}/man1/guix*
|
|
%{_unitdir}/guix*.service
|
|
%attr(755,root,root) %dir /gnu
|
|
%attr(775,root,%{guix_builder_group}) %dir /gnu/store
|
|
|
|
%changelog
|