summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rw-r--r--patchelf.spec.in34
2 files changed, 38 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index 8ea164e..7f17304 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,3 +1,6 @@
SUBDIRS = src tests
-EXTRA_DIST = COPYING README
+EXTRA_DIST = COPYING README patchelf.spec patchelf.spec.in
+
+patchelf.spec: patchelf.spec.in
+ sed -e "s^@version\@^$(VERSION)^g" < patchelf.spec.in > patchelf.spec
diff --git a/patchelf.spec.in b/patchelf.spec.in
new file mode 100644
index 0000000..71189de
--- /dev/null
+++ b/patchelf.spec.in
@@ -0,0 +1,34 @@
+Summary: A utility for patching ELF binaries
+Name: patchelf
+Version: @version@
+Release: 1
+License: GPL
+URL: http://nix.cs.uu.nl/patchelf.html
+Source0: %{name}-@version@.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
+Prefix: /usr
+
+%description
+
+PatchELF is simple utility for modifing existing ELF executables and
+libraries. It can change the dynamic loader ("ELF interpreter") of
+executables and change the RPATH of executables and libraries.
+
+%prep
+%setup -q
+
+%build
+./configure --prefix=%{_prefix}
+make
+make check
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT install
+strip $RPM_BUILD_ROOT/%{_prefix}/bin/* || true
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+/