From 9ff365709541b8f50fddcf667ded07a5b9f774de Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 2 Jan 2004 16:04:53 +0000 Subject: * Generate RPM spec file. --- Makefile.am | 8 ++++++-- configure.ac | 4 ++-- nix.spec | 42 ------------------------------------------ nix.spec.in | 42 ++++++++++++++++++++++++++++++++++++++++++ substitute.mk | 3 ++- 5 files changed, 52 insertions(+), 47 deletions(-) delete mode 100644 nix.spec create mode 100644 nix.spec.in diff --git a/Makefile.am b/Makefile.am index 99ec7f741209..2b44a56a6064 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,10 @@ SUBDIRS = externals src scripts corepkgs doc -EXTRA_DIST = substitute.mk nix.spec +EXTRA_DIST = substitute.mk nix.spec nix.spec.in -rpm: dist +include ./substitute.mk + +nix.spec: nix.spec.in + +rpm: nix.spec dist rpm $(EXTRA_RPM_FLAGS) -ta $(distdir).tar.gz diff --git a/configure.ac b/configure.ac index 85244ebabfaf..ecd97b1e779d 100644 --- a/configure.ac +++ b/configure.ac @@ -5,9 +5,9 @@ AM_INIT_AUTOMAKE # Put the revision number in the version. if REVISION=`test -d $srcdir/.svn && svnversion $srcdir 2> /dev/null`; then - VERSION="$VERSION-r$REVISION" + VERSION="${VERSION}-pre${REVISION}" elif REVISION=`cat $srcdir/svn-revision 2> /dev/null`; then - VERSION="$VERSION-r$REVISION" + VERSION="${VERSION}-pre${REVISION}" fi AC_PREFIX_DEFAULT(/nix) diff --git a/nix.spec b/nix.spec deleted file mode 100644 index 74fc18ef28ca..000000000000 --- a/nix.spec +++ /dev/null @@ -1,42 +0,0 @@ -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 -%{_prefix}/store -%config -%{_prefix}/etc -#%doc -#%{_prefix}/share/nix/manual diff --git a/nix.spec.in b/nix.spec.in new file mode 100644 index 000000000000..388c4075196c --- /dev/null +++ b/nix.spec.in @@ -0,0 +1,42 @@ +Summary: The Nix software deployment system +Name: nix +Version: @version@ +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 +%{_prefix}/store +%config +%{_prefix}/etc +#%doc +#%{_prefix}/share/nix/manual diff --git a/substitute.mk b/substitute.mk index cc21eba40245..bbdb9b617b4f 100644 --- a/substitute.mk +++ b/substitute.mk @@ -8,5 +8,6 @@ -e "s^@libexecdir\@^$(libexecdir)^g" \ -e "s^@system\@^$(system)^g" \ -e "s^@wget\@^$(wget)^g" \ + -e "s^@version\@^$(VERSION)^g" \ < $< > $@ || rm $@ - chmod +x $@ + if test -x $<; then chmod +x $@; fi -- cgit 1.4.1