about summary refs log tree commit diff
path: root/nix.spec.in
diff options
context:
space:
mode:
authorMichel Alexandre Salim <michel@sylvestre.me>2012-05-17T04·04+0800
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-05-31T12·59-0400
commitd0308073c35799cce98bc853eba64f3922fadcfd (patch)
treec2ba661a74e885819762a10d774f044c824e80c5 /nix.spec.in
parente545a7f9a881d9857360713d0d3b0edc54781875 (diff)
- only enable deprecated spec sections when building on systems with older RPM versions - move tests to dedicated %check section - use standard build macros
Diffstat (limited to 'nix.spec.in')
-rw-r--r--nix.spec.in18
1 files changed, 12 insertions, 6 deletions
diff --git a/nix.spec.in b/nix.spec.in
index c7faf2d9d7..12f3f6dece 100644
--- a/nix.spec.in
+++ b/nix.spec.in
@@ -12,11 +12,14 @@ Name: nix
 Version: @version@
 Release: 1
 License: GPL
-Group: Software Deployment
+%if 0%{?rhel}
+Group: Applications/System
+%endif
 URL: http://nixos.org/
 Source0: %{name}-@version@.tar.bz2
+%if 0%{?el5}
 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
-Prefix: /usr
+%endif
 Requires: /usr/bin/perl
 Requires: curl
 Requires: perl-DBD-SQLite
@@ -53,15 +56,18 @@ if test -n "%{enable_setuid}"; then
         extraFlags="$extraFlags --with-nix-group=%{nix_group}"
     fi
 fi
-./configure --prefix=%{_prefix} --sysconfdir=/etc $extraFlags
-make
-make check
+%configure $extraFlags
+make %{?_smp_flags}
 
 %install
+%if 0%{?el5}
 rm -rf $RPM_BUILD_ROOT
+%endif
 make DESTDIR=$RPM_BUILD_ROOT install
 rm $RPM_BUILD_ROOT/etc/nix/nix.conf
-strip $RPM_BUILD_ROOT/%{_prefix}/bin/* || true
+
+%check
+make check
 
 %clean
 rm -rf $RPM_BUILD_ROOT