* RPM spec file.
* Respect DESTDIR variable.
This commit is contained in:
parent
68f2fadb78
commit
94175e978a
8 changed files with 76 additions and 32 deletions
|
@ -1,3 +1,6 @@
|
||||||
SUBDIRS = externals src scripts corepkgs doc
|
SUBDIRS = externals src scripts corepkgs doc
|
||||||
|
|
||||||
EXTRA_DIST = substitute.mk
|
EXTRA_DIST = substitute.mk nix.spec
|
||||||
|
|
||||||
|
rpm: dist
|
||||||
|
rpm -ta $(distdir).tar.gz
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
install-exec-local:
|
install-exec-local:
|
||||||
$(INSTALL) -d $(datadir)/nix/corepkgs
|
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs
|
||||||
$(INSTALL) -d $(datadir)/nix/corepkgs/buildenv
|
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/buildenv
|
||||||
$(INSTALL_DATA) default.nix $(datadir)/nix/corepkgs/buildenv
|
$(INSTALL_DATA) default.nix $(DESTDIR)$(datadir)/nix/corepkgs/buildenv
|
||||||
$(INSTALL_PROGRAM) builder.pl $(datadir)/nix/corepkgs/buildenv
|
$(INSTALL_PROGRAM) builder.pl $(DESTDIR)$(datadir)/nix/corepkgs/buildenv
|
||||||
|
|
||||||
include ../../substitute.mk
|
include ../../substitute.mk
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
all-local: builder.sh
|
all-local: builder.sh
|
||||||
|
|
||||||
install-exec-local:
|
install-exec-local:
|
||||||
$(INSTALL) -d $(datadir)/nix/corepkgs
|
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs
|
||||||
$(INSTALL) -d $(datadir)/nix/corepkgs/fetchurl
|
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/fetchurl
|
||||||
$(INSTALL_DATA) default.nix $(datadir)/nix/corepkgs/fetchurl
|
$(INSTALL_DATA) default.nix $(DESTDIR)$(datadir)/nix/corepkgs/fetchurl
|
||||||
$(INSTALL_PROGRAM) builder.sh $(datadir)/nix/corepkgs/fetchurl
|
$(INSTALL_PROGRAM) builder.sh $(DESTDIR)$(datadir)/nix/corepkgs/fetchurl
|
||||||
|
|
||||||
include ../../substitute.mk
|
include ../../substitute.mk
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
all-local: nar.sh unnar.sh
|
all-local: nar.sh unnar.sh
|
||||||
|
|
||||||
install-exec-local:
|
install-exec-local:
|
||||||
$(INSTALL) -d $(datadir)/nix/corepkgs
|
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs
|
||||||
$(INSTALL) -d $(datadir)/nix/corepkgs/nar
|
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/nar
|
||||||
$(INSTALL_DATA) nar.nix $(datadir)/nix/corepkgs/nar
|
$(INSTALL_DATA) nar.nix $(DESTDIR)$(datadir)/nix/corepkgs/nar
|
||||||
$(INSTALL_PROGRAM) nar.sh $(datadir)/nix/corepkgs/nar
|
$(INSTALL_PROGRAM) nar.sh $(DESTDIR)$(datadir)/nix/corepkgs/nar
|
||||||
$(INSTALL_DATA) unnar.nix $(datadir)/nix/corepkgs/nar
|
$(INSTALL_DATA) unnar.nix $(DESTDIR)$(datadir)/nix/corepkgs/nar
|
||||||
$(INSTALL_PROGRAM) unnar.sh $(datadir)/nix/corepkgs/nar
|
$(INSTALL_PROGRAM) unnar.sh $(DESTDIR)$(datadir)/nix/corepkgs/nar
|
||||||
|
|
||||||
include ../../substitute.mk
|
include ../../substitute.mk
|
||||||
|
|
||||||
|
|
|
@ -26,9 +26,9 @@ book.html: $(SOURCES) book.is-valid
|
||||||
all-local: book.html
|
all-local: book.html
|
||||||
|
|
||||||
install-data-local: book.html
|
install-data-local: book.html
|
||||||
$(INSTALL) -d $(datadir)/nix/manual
|
$(INSTALL) -d $(DESTDIR)$(datadir)/nix/manual
|
||||||
$(INSTALL_DATA) book.html $(datadir)/nix/manual
|
$(INSTALL_DATA) book.html $(DESTDIR)$(datadir)/nix/manual
|
||||||
$(INSTALL_DATA) style.css $(datadir)/nix/manual
|
$(INSTALL_DATA) style.css $(DESTDIR)$(datadir)/nix/manual
|
||||||
|
|
||||||
EXTRA_DIST = $(SOURCES) book.html book.is-valid $(MANS)
|
EXTRA_DIST = $(SOURCES) book.html book.is-valid $(MANS)
|
||||||
|
|
||||||
|
|
41
nix.spec
Normal file
41
nix.spec
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
Summary: The Nix software deployment system
|
||||||
|
Name: nix
|
||||||
|
Version: 0.5
|
||||||
|
Release: 1
|
||||||
|
License: GPL
|
||||||
|
Group: WeetNiet
|
||||||
|
URL: http://www.cs.uu.nl/groups/ST/twiki/bin/view/Trace/NixDeploymentSystem
|
||||||
|
Source0: %{name}-%{version}.tar.gz
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
|
||||||
|
%define _prefix /nix
|
||||||
|
Prefix: %{_prefix}
|
||||||
|
|
||||||
|
%description
|
||||||
|
|
||||||
|
Nix is a software deployment system.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%build
|
||||||
|
./configure --prefix=%{_prefix}
|
||||||
|
make
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
make DESTDIR=$RPM_BUILD_ROOT install
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_prefix}/bin
|
||||||
|
%{_prefix}/libexec
|
||||||
|
%{_prefix}/var
|
||||||
|
%{_prefix}/share
|
||||||
|
%{_prefix}/man
|
||||||
|
%config
|
||||||
|
%{_prefix}/etc
|
||||||
|
#%doc
|
||||||
|
#%{_prefix}/share/nix/manual
|
|
@ -7,13 +7,13 @@ noinst_SCRIPTS = nix-profile.sh
|
||||||
nix-pull nix-push: readmanifest.pm
|
nix-pull nix-push: readmanifest.pm
|
||||||
|
|
||||||
install-exec-local: readmanifest.pm
|
install-exec-local: readmanifest.pm
|
||||||
$(INSTALL) -d $(sysconfdir)/profile.d
|
$(INSTALL) -d $(DESTDIR)$(sysconfdir)/profile.d
|
||||||
$(INSTALL_PROGRAM) nix-profile.sh $(sysconfdir)/profile.d/nix.sh
|
$(INSTALL_PROGRAM) nix-profile.sh $(DESTDIR)$(sysconfdir)/profile.d/nix.sh
|
||||||
$(INSTALL) -d $(libexecdir)/nix
|
$(INSTALL) -d $(DESTDIR)$(libexecdir)/nix
|
||||||
$(INSTALL_DATA) readmanifest.pm $(libexecdir)/nix
|
$(INSTALL_DATA) readmanifest.pm $(DESTDIR)$(libexecdir)/nix
|
||||||
$(INSTALL) -d $(sysconfdir)/nix
|
$(INSTALL) -d $(DESTDIR)$(sysconfdir)/nix
|
||||||
# !!! don't overwrite local modifications
|
# !!! don't overwrite local modifications
|
||||||
$(INSTALL_DATA) prebuilts.conf $(sysconfdir)/nix/prebuilts.conf
|
$(INSTALL_DATA) prebuilts.conf $(DESTDIR)$(sysconfdir)/nix/prebuilts.conf
|
||||||
|
|
||||||
include ../substitute.mk
|
include ../substitute.mk
|
||||||
|
|
||||||
|
|
|
@ -13,11 +13,11 @@ AM_CXXFLAGS = \
|
||||||
-I.. -I../../externals/inst/include -I../libutil -I../libstore -I../libmain
|
-I.. -I../../externals/inst/include -I../libutil -I../libstore -I../libmain
|
||||||
|
|
||||||
install-data-local:
|
install-data-local:
|
||||||
$(INSTALL) -d $(localstatedir)/nix
|
$(INSTALL) -d $(DESTDIR)$(localstatedir)/nix
|
||||||
$(INSTALL) -d $(localstatedir)/nix/db
|
$(INSTALL) -d $(DESTDIR)$(localstatedir)/nix/db
|
||||||
$(INSTALL) -d $(localstatedir)/nix/links
|
$(INSTALL) -d $(DESTDIR)$(localstatedir)/nix/links
|
||||||
rm -f $(prefix)/current
|
rm -f $(DESTDIR)$(prefix)/current
|
||||||
ln -sf $(localstatedir)/nix/links/current $(prefix)/current
|
ln -sf $(localstatedir)/nix/links/current $(DESTDIR)$(prefix)/current
|
||||||
$(INSTALL) -d $(localstatedir)/log/nix
|
$(INSTALL) -d $(DESTDIR)$(localstatedir)/log/nix
|
||||||
$(INSTALL) -d $(prefix)/store
|
$(INSTALL) -d $(DESTDIR)$(prefix)/store
|
||||||
$(bindir)/nix-store --init
|
# $(bindir)/nix-store --init
|
||||||
|
|
Loading…
Reference in a new issue