From d0308073c35799cce98bc853eba64f3922fadcfd Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Thu, 17 May 2012 12:04:56 +0800 Subject: [PATCH] - only enable deprecated spec sections when building on systems with older RPM versions - move tests to dedicated %check section - use standard build macros --- nix.spec.in | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/nix.spec.in b/nix.spec.in index c7faf2d9d..12f3f6dec 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