diff options
author | Michel Alexandre Salim <michel@sylvestre.me> | 2012-05-17T04·04+0800 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-05-31T12·59-0400 |
commit | d0308073c35799cce98bc853eba64f3922fadcfd (patch) | |
tree | c2ba661a74e885819762a10d774f044c824e80c5 | |
parent | e545a7f9a881d9857360713d0d3b0edc54781875 (diff) |
- only enable deprecated spec sections when building on systems with older RPM versions - move tests to dedicated %check section - use standard build macros
-rw-r--r-- | nix.spec.in | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/nix.spec.in b/nix.spec.in index c7faf2d9d741..12f3f6deceda 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 |