From 3f01d907697e4641d66c45937533534513c16619 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Mon, 10 Aug 2015 14:36:55 +0300 Subject: [PATCH] add templates dir --- templates.patch | 11 +++++++++++ xpm.spec | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 templates.patch diff --git a/templates.patch b/templates.patch new file mode 100644 index 0000000..1b6d558 --- /dev/null +++ b/templates.patch @@ -0,0 +1,11 @@ +--- ./lib/fpm/package.rb~ 2015-08-10 13:11:29.000000000 +0300 ++++ ./lib/fpm/package.rb 2015-08-10 13:12:44.109522857 +0300 +@@ -319,7 +319,7 @@ + end # def files + + def template_dir +- File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "templates")) ++ File.expand_path(File.join(File.dirname(__FILE__), "templates")) + end + + def template(path) diff --git a/xpm.spec b/xpm.spec index a546d66..f591a25 100644 --- a/xpm.spec +++ b/xpm.spec @@ -5,11 +5,12 @@ Summary: Cross package maker. DEB/RPM generation or conversion Name: xpm Version: 1.3.3.6 -Release: 0.1 +Release: 0.2 License: MIT-like Group: Development/Languages Source0: http://fossil.include-once.org/xpm/tarball/%{name}-%{version}.tar.gz?uuid=v%{version}&/%{name}-%{version}.tar.gz # Source0-md5: f73ececfa6725965fc41d4e11ea85992 +Patch0: templates.patch URL: http://fossil.include-once.org/xpm/ BuildRequires: rpm-rubyprov BuildRequires: rpmbuild(macros) >= 1.656 @@ -48,12 +49,17 @@ It creates or converts between: %prep %setup -q +%patch0 -p1 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/* +# cleanup backups after patching +find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f + %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir}} cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir} +cp -a templates $RPM_BUILD_ROOT%{ruby_vendorlibdir}/fpm cp -a bin/* $RPM_BUILD_ROOT%{_bindir} %clean -- 2.44.0