diff options
-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | corepkgs/buildenv/Makefile.am | 8 | ||||
-rw-r--r-- | corepkgs/fetchurl/Makefile.am | 8 | ||||
-rw-r--r-- | corepkgs/nar/Makefile.am | 12 | ||||
-rw-r--r-- | doc/manual/Makefile.am | 6 | ||||
-rw-r--r-- | nix.spec | 41 | ||||
-rw-r--r-- | scripts/Makefile.am | 12 | ||||
-rw-r--r-- | src/nix-store/Makefile.am | 16 |
8 files changed, 76 insertions, 32 deletions
diff --git a/Makefile.am b/Makefile.am index f069e454a95e..f9fc8695f53f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,3 +1,6 @@ SUBDIRS = externals src scripts corepkgs doc -EXTRA_DIST = substitute.mk +EXTRA_DIST = substitute.mk nix.spec + +rpm: dist + rpm -ta $(distdir).tar.gz diff --git a/corepkgs/buildenv/Makefile.am b/corepkgs/buildenv/Makefile.am index 74c39199f689..f6a14600f3c4 100644 --- a/corepkgs/buildenv/Makefile.am +++ b/corepkgs/buildenv/Makefile.am @@ -1,8 +1,8 @@ install-exec-local: - $(INSTALL) -d $(datadir)/nix/corepkgs - $(INSTALL) -d $(datadir)/nix/corepkgs/buildenv - $(INSTALL_DATA) default.nix $(datadir)/nix/corepkgs/buildenv - $(INSTALL_PROGRAM) builder.pl $(datadir)/nix/corepkgs/buildenv + $(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs + $(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/buildenv + $(INSTALL_DATA) default.nix $(DESTDIR)$(datadir)/nix/corepkgs/buildenv + $(INSTALL_PROGRAM) builder.pl $(DESTDIR)$(datadir)/nix/corepkgs/buildenv include ../../substitute.mk diff --git a/corepkgs/fetchurl/Makefile.am b/corepkgs/fetchurl/Makefile.am index 270bf0142488..3cb63e0ce177 100644 --- a/corepkgs/fetchurl/Makefile.am +++ b/corepkgs/fetchurl/Makefile.am @@ -1,10 +1,10 @@ all-local: builder.sh install-exec-local: - $(INSTALL) -d $(datadir)/nix/corepkgs - $(INSTALL) -d $(datadir)/nix/corepkgs/fetchurl - $(INSTALL_DATA) default.nix $(datadir)/nix/corepkgs/fetchurl - $(INSTALL_PROGRAM) builder.sh $(datadir)/nix/corepkgs/fetchurl + $(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs + $(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/fetchurl + $(INSTALL_DATA) default.nix $(DESTDIR)$(datadir)/nix/corepkgs/fetchurl + $(INSTALL_PROGRAM) builder.sh $(DESTDIR)$(datadir)/nix/corepkgs/fetchurl include ../../substitute.mk diff --git a/corepkgs/nar/Makefile.am b/corepkgs/nar/Makefile.am index 3e0aab869ddf..8fb879ae1b08 100644 --- a/corepkgs/nar/Makefile.am +++ b/corepkgs/nar/Makefile.am @@ -1,12 +1,12 @@ all-local: nar.sh unnar.sh install-exec-local: - $(INSTALL) -d $(datadir)/nix/corepkgs - $(INSTALL) -d $(datadir)/nix/corepkgs/nar - $(INSTALL_DATA) nar.nix $(datadir)/nix/corepkgs/nar - $(INSTALL_PROGRAM) nar.sh $(datadir)/nix/corepkgs/nar - $(INSTALL_DATA) unnar.nix $(datadir)/nix/corepkgs/nar - $(INSTALL_PROGRAM) unnar.sh $(datadir)/nix/corepkgs/nar + $(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs + $(INSTALL) -d $(DESTDIR)$(datadir)/nix/corepkgs/nar + $(INSTALL_DATA) nar.nix $(DESTDIR)$(datadir)/nix/corepkgs/nar + $(INSTALL_PROGRAM) nar.sh $(DESTDIR)$(datadir)/nix/corepkgs/nar + $(INSTALL_DATA) unnar.nix $(DESTDIR)$(datadir)/nix/corepkgs/nar + $(INSTALL_PROGRAM) unnar.sh $(DESTDIR)$(datadir)/nix/corepkgs/nar include ../../substitute.mk diff --git a/doc/manual/Makefile.am b/doc/manual/Makefile.am index 46c79ae3b899..749eb07c67aa 100644 --- a/doc/manual/Makefile.am +++ b/doc/manual/Makefile.am @@ -26,9 +26,9 @@ book.html: $(SOURCES) book.is-valid all-local: book.html install-data-local: book.html - $(INSTALL) -d $(datadir)/nix/manual - $(INSTALL_DATA) book.html $(datadir)/nix/manual - $(INSTALL_DATA) style.css $(datadir)/nix/manual + $(INSTALL) -d $(DESTDIR)$(datadir)/nix/manual + $(INSTALL_DATA) book.html $(DESTDIR)$(datadir)/nix/manual + $(INSTALL_DATA) style.css $(DESTDIR)$(datadir)/nix/manual EXTRA_DIST = $(SOURCES) book.html book.is-valid $(MANS) diff --git a/nix.spec b/nix.spec new file mode 100644 index 000000000000..9d459034b246 --- /dev/null +++ b/nix.spec @@ -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 diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 1662e99c1caf..65d9a4fd8101 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -7,13 +7,13 @@ noinst_SCRIPTS = nix-profile.sh nix-pull nix-push: readmanifest.pm install-exec-local: readmanifest.pm - $(INSTALL) -d $(sysconfdir)/profile.d - $(INSTALL_PROGRAM) nix-profile.sh $(sysconfdir)/profile.d/nix.sh - $(INSTALL) -d $(libexecdir)/nix - $(INSTALL_DATA) readmanifest.pm $(libexecdir)/nix - $(INSTALL) -d $(sysconfdir)/nix + $(INSTALL) -d $(DESTDIR)$(sysconfdir)/profile.d + $(INSTALL_PROGRAM) nix-profile.sh $(DESTDIR)$(sysconfdir)/profile.d/nix.sh + $(INSTALL) -d $(DESTDIR)$(libexecdir)/nix + $(INSTALL_DATA) readmanifest.pm $(DESTDIR)$(libexecdir)/nix + $(INSTALL) -d $(DESTDIR)$(sysconfdir)/nix # !!! 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 diff --git a/src/nix-store/Makefile.am b/src/nix-store/Makefile.am index 80e5987429d9..74cf814a7f95 100644 --- a/src/nix-store/Makefile.am +++ b/src/nix-store/Makefile.am @@ -13,11 +13,11 @@ AM_CXXFLAGS = \ -I.. -I../../externals/inst/include -I../libutil -I../libstore -I../libmain install-data-local: - $(INSTALL) -d $(localstatedir)/nix - $(INSTALL) -d $(localstatedir)/nix/db - $(INSTALL) -d $(localstatedir)/nix/links - rm -f $(prefix)/current - ln -sf $(localstatedir)/nix/links/current $(prefix)/current - $(INSTALL) -d $(localstatedir)/log/nix - $(INSTALL) -d $(prefix)/store - $(bindir)/nix-store --init + $(INSTALL) -d $(DESTDIR)$(localstatedir)/nix + $(INSTALL) -d $(DESTDIR)$(localstatedir)/nix/db + $(INSTALL) -d $(DESTDIR)$(localstatedir)/nix/links + rm -f $(DESTDIR)$(prefix)/current + ln -sf $(localstatedir)/nix/links/current $(DESTDIR)$(prefix)/current + $(INSTALL) -d $(DESTDIR)$(localstatedir)/log/nix + $(INSTALL) -d $(DESTDIR)$(prefix)/store +# $(bindir)/nix-store --init |