forked from lix-project/lix
* Add some variability to RPM spec files: allow setuid options to be
set on the rpmbuild command line.
This commit is contained in:
parent
5c443b6550
commit
fb28cfc86d
28
nix.spec.in
28
nix.spec.in
|
@ -1,10 +1,20 @@
|
||||||
|
# This RPM accepts the following defininitions (which can be passed
|
||||||
|
# using `--define' to rpmbuild, e.g., --define 'enable_setuid yes'):
|
||||||
|
# enable_setuid: if non-empty, pass `--enable-setuid' to configure
|
||||||
|
# nix_user: if set, pass as `--with-nix-user' to configure
|
||||||
|
# nix_group: if set, pass as `--with-nix-group' to configure
|
||||||
|
|
||||||
|
%{!?enable_setuid: %define enable_setuid ""}
|
||||||
|
%{!?nix_user: %define nix_user ""}
|
||||||
|
%{!?nix_group: %define nix_group ""}
|
||||||
|
|
||||||
Summary: The Nix software deployment system
|
Summary: The Nix software deployment system
|
||||||
Name: nix
|
Name: nix
|
||||||
Version: @version@
|
Version: @version@
|
||||||
Release: 1
|
Release: 1
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: WeetNiet
|
Group: Software Deployment
|
||||||
URL: http://www.cs.uu.nl/groups/ST/twiki/bin/view/Trace/NixDeploymentSystem
|
URL: http://www.cs.uu.nl/groups/ST/Trace/Nix
|
||||||
Source0: %{name}-@version@.tar.gz
|
Source0: %{name}-@version@.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
||||||
%define _prefix /nix
|
%define _prefix /nix
|
||||||
|
@ -13,13 +23,23 @@ Requires: /usr/bin/perl
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
||||||
Nix is a software deployment system.
|
Nix is a system for software deployment.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
%build
|
%build
|
||||||
./configure --prefix=%{_prefix}
|
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
|
||||||
|
./configure --prefix=%{_prefix} $extraFlags
|
||||||
make
|
make
|
||||||
make check
|
make check
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue