2004-09-06 13:05:21 +03:00
|
|
|
%define enable_setuid ""
|
|
|
|
%define nix_user "nix"
|
|
|
|
%define nix_group "nix"
|
2004-09-06 11:17:55 +03:00
|
|
|
|
2004-09-06 13:05:21 +03:00
|
|
|
# If set, the Nix user and group will be created by the RPM
|
|
|
|
# pre-install script.
|
|
|
|
%define nix_user_uid ""
|
|
|
|
%define nix_group_gid ""
|
2004-09-06 11:17:55 +03:00
|
|
|
|
2003-12-30 22:09:00 +02:00
|
|
|
Summary: The Nix software deployment system
|
|
|
|
Name: nix
|
2004-01-02 18:04:53 +02:00
|
|
|
Version: @version@
|
2003-12-30 22:09:00 +02:00
|
|
|
Release: 1
|
|
|
|
License: GPL
|
2004-09-06 11:17:55 +03:00
|
|
|
Group: Software Deployment
|
2008-08-29 16:59:03 +03:00
|
|
|
URL: http://nixos.org/
|
2005-05-07 18:45:38 +03:00
|
|
|
Source0: %{name}-@version@.tar.bz2
|
2003-12-30 22:09:00 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
2008-11-20 16:14:35 +02:00
|
|
|
Prefix: /usr
|
2004-03-29 15:10:15 +03:00
|
|
|
Requires: /usr/bin/perl
|
2005-07-12 19:08:10 +03:00
|
|
|
Requires: curl
|
2011-08-08 17:06:10 +03:00
|
|
|
Requires: perl-DBD-SQLite
|
2011-10-10 21:58:49 +03:00
|
|
|
Requires: perl-devel
|
2003-12-30 22:09:00 +02:00
|
|
|
|
2004-09-08 15:07:19 +03:00
|
|
|
# Hack to make that shitty RPM scanning hack shut up.
|
|
|
|
Provides: perl(readmanifest)
|
|
|
|
|
2003-12-30 22:09:00 +02:00
|
|
|
%description
|
|
|
|
|
2007-03-21 14:39:55 +02:00
|
|
|
Nix is a purely functional package manager. It allows multiple
|
|
|
|
versions of a package to be installed side-by-side, ensures that
|
|
|
|
dependency specifications are complete, supports atomic upgrades and
|
|
|
|
rollbacks, allows non-root users to install software, and has many
|
|
|
|
other features. It is the basis of the NixOS Linux distribution, but
|
|
|
|
it can be used equally well under other Unix systems.
|
2003-12-30 22:09:00 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
2004-09-06 11:17:55 +03:00
|
|
|
extraFlags=
|
|
|
|
if test -n "%{enable_setuid}"; then
|
|
|
|
extraFlags="$extraFlags --enable-setuid"
|
|
|
|
if test -n "%{nix_user}"; then
|
|
|
|
extraFlags="$extraFlags --with-nix-user=%{nix_user}"
|
|
|
|
fi
|
|
|
|
if test -n "%{nix_group}"; then
|
|
|
|
extraFlags="$extraFlags --with-nix-group=%{nix_group}"
|
|
|
|
fi
|
|
|
|
fi
|
2008-11-20 18:10:55 +02:00
|
|
|
./configure --prefix=%{_prefix} --sysconfdir=/etc $extraFlags
|
2003-12-30 22:09:00 +02:00
|
|
|
make
|
2004-05-04 15:15:30 +03:00
|
|
|
make check
|
2003-12-30 22:09:00 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
2008-11-20 18:42:52 +02:00
|
|
|
rm $RPM_BUILD_ROOT/etc/nix/nix.conf
|
2004-01-19 11:01:28 +02:00
|
|
|
strip $RPM_BUILD_ROOT/%{_prefix}/bin/* || true
|
2003-12-30 22:09:00 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
2004-09-06 13:05:21 +03:00
|
|
|
%pre
|
|
|
|
if test -n "%{nix_group_gid}"; then
|
|
|
|
/usr/sbin/groupadd -g %{nix_group_gid} %{nix_group} || true
|
|
|
|
fi
|
|
|
|
if test -n "%{nix_user_uid}"; then
|
|
|
|
/usr/sbin/useradd -c "Nix" -u %{nix_user_uid} \
|
|
|
|
-s /sbin/nologin -r -d /var/empty %{nix_user} \
|
|
|
|
-g %{nix_group} || true
|
|
|
|
fi
|
|
|
|
|
2003-12-30 22:09:00 +02:00
|
|
|
%files
|
2004-09-06 13:05:21 +03:00
|
|
|
#%defattr(-,root,root)
|
2003-12-30 22:09:00 +02:00
|
|
|
%{_prefix}/bin
|
2005-07-25 13:10:24 +03:00
|
|
|
%{_prefix}/lib
|
2003-12-30 22:09:00 +02:00
|
|
|
%{_prefix}/libexec
|
2006-09-05 14:34:50 +03:00
|
|
|
%{_prefix}/include
|
2003-12-30 22:09:00 +02:00
|
|
|
%{_prefix}/share
|
2008-11-20 18:28:04 +02:00
|
|
|
/etc/profile.d/nix.sh
|
2008-11-20 16:14:35 +02:00
|
|
|
/nix/var
|
|
|
|
/nix/store
|
2003-12-30 22:09:00 +02:00
|
|
|
%config
|
2008-11-20 18:28:04 +02:00
|
|
|
/etc/nix
|