From 326f168c02f47b332e432a41b01c714212ee94af Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 14 Dec 2011 16:35:50 +0100 Subject: Use underscores in versions to keep RPM happy RPM doesn't allow dashes in version numbers, so use an underscore instead. Also, let Autoconf generate the RPM spec file. --- Makefile.am | 5 +---- configure.ac | 2 +- patchelf.spec.in | 6 +++--- release.nix | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index 56942b6..170bde7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,6 @@ SUBDIRS = src tests -EXTRA_DIST = COPYING README patchelf.spec patchelf.spec.in version $(man1_MANS) - -patchelf.spec: patchelf.spec.in - sed -e "s^@version\@^$(VERSION)^g" < patchelf.spec.in > patchelf.spec +EXTRA_DIST = COPYING README patchelf.spec version $(man1_MANS) man1_MANS = patchelf.1 diff --git a/configure.ac b/configure.ac index b37b186..372114d 100644 --- a/configure.ac +++ b/configure.ac @@ -5,5 +5,5 @@ AM_INIT_AUTOMAKE([dist-bzip2 foreign]) AC_PROG_CC AC_PROG_CXX -AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile]) +AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile patchelf.spec]) AC_OUTPUT diff --git a/patchelf.spec.in b/patchelf.spec.in index 627f390..7c51bea 100644 --- a/patchelf.spec.in +++ b/patchelf.spec.in @@ -1,13 +1,13 @@ Summary: A utility for patching ELF binaries Name: patchelf -Version: @version@ +Version: @PACKAGE_VERSION@ Release: 1 License: GPL Group: Development/Tools URL: http://nixos.org/patchelf.html -Source0: %{name}-@version@.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot +Source0: %{name}-@PACKAGE_VERSION@.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{PACKAGE_VERSION}-buildroot Prefix: /usr %description diff --git a/release.nix b/release.nix index 1b37ca0..9cdb41b 100644 --- a/release.nix +++ b/release.nix @@ -14,7 +14,7 @@ let pkgs.releaseTools.sourceTarball { name = "patchelf-tarball"; version = builtins.readFile ./version; - versionSuffix = if officialRelease then "" else "pre${toString patchelfSrc.revCount}-${patchelfSrc.shortRev}"; + versionSuffix = if officialRelease then "" else "pre${toString patchelfSrc.revCount}_${patchelfSrc.shortRev}"; src = patchelfSrc; inherit officialRelease; postDist = '' -- cgit v0.12