2015-02-05 15:36:30 +01:00
|
|
|
#
|
|
|
|
# spec file for package guix
|
|
|
|
#
|
2018-02-15 23:09:57 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2015-02-05 15:36:30 +01:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
2016-05-15 20:30:50 +02:00
|
|
|
|
2015-10-03 08:25:07 +02:00
|
|
|
# if there is systemd present, systemd_requires is defined
|
|
|
|
%define systemd_present %{defined systemd_requires}
|
2015-02-05 15:36:30 +01:00
|
|
|
%define guile guile-2.0.9.tar.xz
|
2015-11-04 21:36:57 +01:00
|
|
|
%define guix_builder_group guixbuild
|
2015-02-05 15:36:30 +01:00
|
|
|
Name: guix
|
2018-02-15 23:09:57 +01:00
|
|
|
Version: 0.14.0
|
2015-02-05 15:36:30 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: GNU Package manager
|
2018-03-09 20:12:18 +01:00
|
|
|
License: GPL-3.0-only
|
2015-02-05 15:36:30 +01:00
|
|
|
Group: System/Packages
|
|
|
|
Url: http://www.gnu.org/software/guix/
|
|
|
|
Source0: ftp://alpha.gnu.org/gnu/guix/%{name}-%{version}.tar.gz
|
2015-02-25 20:01:28 +01:00
|
|
|
Source1: ftp://alpha.gnu.org/gnu/guix/%{name}-%{version}.tar.gz.sig
|
|
|
|
Source2: %{name}.keyring
|
2015-02-05 15:36:30 +01:00
|
|
|
# source file renamed - this would lead to 3 same file names
|
|
|
|
# http://alpha.gnu.org/gnu/guix/bootstrap/i686-linux/20131110/%%{guile}
|
2015-02-25 20:01:28 +01:00
|
|
|
Source3: i686-linux-%{guile}
|
2015-02-05 15:36:30 +01:00
|
|
|
# http://alpha.gnu.org/gnu/guix/bootstrap/x86_64-linux/20131110/%%{guile}
|
2015-02-25 20:01:28 +01:00
|
|
|
Source4: x86_64-linux-%{guile}
|
2015-02-05 15:36:30 +01:00
|
|
|
# http://alpha.gnu.org/gnu/guix/bootstrap/mips64el-linux/20131110/%%{guile}
|
2015-02-25 20:01:28 +01:00
|
|
|
Source5: mips64el-linux-%{guile}
|
2015-02-05 15:36:30 +01:00
|
|
|
# http://alpha.gnu.org/gnu/guix/bootstrap/armhf-linux/20150101/guile-2.0.11.tar.xz
|
2015-02-25 20:01:28 +01:00
|
|
|
Source6: armhf-linux-guile-2.0.11.tar.xz
|
2016-02-12 12:15:55 +01:00
|
|
|
Source10: guix-rpmlintrc
|
2017-05-28 11:49:52 +02:00
|
|
|
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
|
2018-02-20 23:24:37 +01:00
|
|
|
Source20: run_guix_daemon.sh
|
2015-02-05 15:36:30 +01:00
|
|
|
BuildRequires: gcc-c++
|
2016-05-15 20:30:50 +02:00
|
|
|
BuildRequires: gnutls-guile
|
2018-02-15 23:09:57 +01:00
|
|
|
BuildRequires: guile-charting
|
2018-03-09 20:12:18 +01:00
|
|
|
BuildRequires: guile-devel >= 2.0
|
2018-02-15 23:09:57 +01:00
|
|
|
BuildRequires: guile-git
|
2018-02-19 11:17:08 +01:00
|
|
|
# this is actually just to make guile-git working
|
2015-02-05 15:36:30 +01:00
|
|
|
BuildRequires: libgcrypt-devel
|
2018-02-19 11:17:08 +01:00
|
|
|
BuildRequires: libgit2-devel
|
2015-02-05 15:36:30 +01:00
|
|
|
BuildRequires: pkgconfig
|
2017-05-28 11:49:52 +02:00
|
|
|
BuildRequires: shepherd
|
2015-10-03 08:25:07 +02:00
|
|
|
BuildRequires: pkgconfig(bzip2)
|
2016-05-15 20:30:50 +02:00
|
|
|
BuildRequires: pkgconfig(gnutls)
|
2015-10-03 08:25:07 +02:00
|
|
|
BuildRequires: pkgconfig(sqlite3)
|
2016-07-09 08:25:48 +02:00
|
|
|
Requires: gnutls-guile
|
2015-02-05 15:36:30 +01:00
|
|
|
Requires: guile
|
2016-07-06 18:17:00 +02:00
|
|
|
Requires: libgcrypt-devel
|
2015-02-25 20:01:28 +01:00
|
|
|
Requires(pre): %{install_info_prereq}
|
2015-02-05 15:36:30 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2017-05-28 11:49:52 +02:00
|
|
|
ExclusiveArch: %{ix86} x86_64 %{arm}
|
2015-02-25 20:01:28 +01:00
|
|
|
%{?systemd_requires}
|
2015-10-03 08:25:07 +02:00
|
|
|
%if %{systemd_present}
|
|
|
|
BuildRequires: systemd-rpm-macros
|
|
|
|
%endif
|
2015-02-05 15:36:30 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
Purely functional package manager and a distribution thereof.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2015-10-03 08:25:07 +02:00
|
|
|
# install service file to _unitdir
|
|
|
|
sed -i 's@\$(libdir)/systemd/system@%{_unitdir}@' Makefile.in
|
2015-02-05 15:36:30 +01:00
|
|
|
mkdir -p gnu/packages/bootstrap/{i686,x86_64,mips64el,armhf}-linux
|
2015-02-25 20:01:28 +01:00
|
|
|
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
|
2017-05-28 11:49:52 +02:00
|
|
|
cp %{SOURCE12} gnu/packages/bootstrap/aarch64-linux/guile-2.0.14.tar.xz
|
2015-02-05 15:36:30 +01:00
|
|
|
|
|
|
|
%build
|
2018-02-15 23:09:57 +01:00
|
|
|
export GUILE_WARN_DEPRECATED
|
2015-02-05 15:36:30 +01:00
|
|
|
%configure \
|
|
|
|
--disable-silent-rules
|
|
|
|
|
|
|
|
make %{?_smp_mflags}
|
|
|
|
|
|
|
|
%install
|
2017-05-28 11:49:52 +02:00
|
|
|
%make_install
|
2015-02-05 15:36:30 +01:00
|
|
|
%find_lang %{name}
|
|
|
|
%find_lang guix-packages
|
|
|
|
rm %{buildroot}%{_infodir}/dir
|
2015-11-01 18:38:30 +01:00
|
|
|
install -d -m 0755 %{buildroot}/gnu
|
|
|
|
install -d -m 0755 %{buildroot}/gnu/store
|
2015-10-03 08:25:07 +02:00
|
|
|
%if ! %{systemd_present}
|
|
|
|
rm -rvf %{buildroot}%{_unitdir}
|
2016-05-15 20:30:50 +02:00
|
|
|
%else
|
|
|
|
# if systemd is used, upstart files are not needed
|
|
|
|
rm -rvf %{buildroot}%{_libdir}/upstart
|
2015-10-03 08:25:07 +02:00
|
|
|
%endif
|
2017-05-28 11:49:52 +02:00
|
|
|
ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rcguix-daemon
|
2018-02-20 23:38:15 +01:00
|
|
|
install -m 0755 -t %{buildroot}%{_bindir} %{SOURCE20}
|
2018-02-20 23:24:37 +01:00
|
|
|
sed -i 's@^ExecStart=.*@ExecStart=/usr/bin/run_guix_daemon.sh@' %{buildroot}%{_unitdir}/guix-daemon.service
|
2016-02-12 10:20:25 +01:00
|
|
|
|
2015-02-05 15:36:30 +01:00
|
|
|
%pre
|
2015-11-04 21:36:57 +01:00
|
|
|
%{_sbindir}/groupadd -r %{guix_builder_group} >/dev/null 2>/dev/null || :
|
2015-02-05 15:36:30 +01:00
|
|
|
for i in `seq 1 5`; do
|
2016-01-05 20:04:10 +01:00
|
|
|
%{_sbindir}/useradd -r -o -g %{guix_builder_group} -G %{guix_builder_group} \
|
2015-11-01 18:38:30 +01:00
|
|
|
-u $((60+$i)) -c "Guix builder $i" -s /sbin/nologin \
|
|
|
|
-d %{_localstatedir}/empty guix-builder$i 2> /dev/null || :
|
2015-02-05 15:36:30 +01:00
|
|
|
done
|
2015-10-03 08:25:07 +02:00
|
|
|
%if %{systemd_present}
|
|
|
|
%service_add_pre guix-daemon.service
|
2015-02-05 15:36:30 +01:00
|
|
|
|
|
|
|
%preun
|
2015-10-03 08:25:07 +02:00
|
|
|
%service_del_preun guix-daemon.service
|
|
|
|
%endif
|
|
|
|
|
2015-02-05 15:36:30 +01:00
|
|
|
%post
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/guix.info.gz
|
2015-10-03 08:25:07 +02:00
|
|
|
%if %{systemd_present}
|
|
|
|
%service_add_post guix-daemon.service
|
|
|
|
%endif
|
2015-02-05 15:36:30 +01:00
|
|
|
|
|
|
|
%postun
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/guix.info.gz
|
2015-10-03 08:25:07 +02:00
|
|
|
%if %{systemd_present}
|
|
|
|
%service_del_postun guix-daemon.service
|
|
|
|
%endif
|
2015-02-05 15:36:30 +01:00
|
|
|
|
|
|
|
%files -f %{name}.lang -f guix-packages.lang
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc COPYING README
|
2016-02-12 10:20:25 +01:00
|
|
|
# bash completion script is not configuration file but who would argue
|
|
|
|
# with RPM lint :b
|
2016-05-15 20:30:50 +02:00
|
|
|
%{_sysconfdir}/bash_completion.d/guix
|
2015-02-05 15:36:30 +01:00
|
|
|
%{_datadir}/guile
|
|
|
|
%{_datadir}/guix
|
2016-12-31 11:48:21 +01:00
|
|
|
%{_datadir}/zsh
|
2018-02-20 23:50:07 +01:00
|
|
|
%{_bindir}/*guix*
|
2016-02-12 10:20:25 +01:00
|
|
|
%{_sbindir}/*guix*
|
2015-02-05 15:36:30 +01:00
|
|
|
%{_libexecdir}/guix
|
|
|
|
%{_libexecdir}/guix-authenticate
|
2018-02-19 15:07:22 +01:00
|
|
|
%{_libdir}/guile/*
|
2016-05-15 20:30:50 +02:00
|
|
|
%if !0%{?systemd_present}
|
|
|
|
%{_libdir}/upstart
|
|
|
|
%endif
|
2015-02-05 15:36:30 +01:00
|
|
|
%{_infodir}/guix*
|
|
|
|
%{_infodir}/images
|
2015-10-03 08:25:07 +02:00
|
|
|
%if %{systemd_present}
|
|
|
|
%{_unitdir}/guix*.service
|
|
|
|
%endif
|
|
|
|
%{_mandir}/man1/guix*
|
2015-11-04 21:36:57 +01:00
|
|
|
%attr(755,root,root) %dir /gnu
|
|
|
|
%attr(775,root,%{guix_builder_group}) %dir /gnu/store
|
2015-02-05 15:36:30 +01:00
|
|
|
|
|
|
|
%changelog
|