Package init

This commit is contained in:
overweight 2019-09-30 11:16:27 -04:00
commit 62b7357c2d
3 changed files with 84 additions and 0 deletions

24
add-missing-shebang.patch Normal file
View File

@ -0,0 +1,24 @@
From e544888882d7630ada8e8df125063bf033e8db09 Mon Sep 17 00:00:00 2001
From: Eric Gerbier <gerbier@users.sourceforge.net>
Date: Sat, 7 Jul 2018 15:53:46 +0200
Subject: [PATCH 02/46] add missing shebang
---
src/rpmrebuild_parser.src | 1 +
1 file changed, 1 insertion(+)
mode change 100644 => 100755 src/rpmrebuild_parser.src
diff --git a/rpmrebuild_parser.src b/rpmrebuild_parser.src
old mode 100644
new mode 100755
index 43634f5..f12706b
--- a/rpmrebuild_parser.src
+++ b/rpmrebuild_parser.src
@@ -1,3 +1,4 @@
+#!/bin/bash
# to be sourced from bash
###############################################################################
#
--
2.19.1

BIN
rpmrebuild-2.11.tar.gz Normal file

Binary file not shown.

60
rpmrebuild.spec Normal file
View File

@ -0,0 +1,60 @@
Name: rpmrebuild
Version: 2.11
Release: 5
Summary: A tool to build a rpm file from the rpm database
License: GPLv2+
URL: http://rpmrebuild.sourceforge.net
Source0: https://downloads.sourceforge.net/rpmrebuild/%{name}-%{version}.tar.gz
Patch6000: add-missing-shebang.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
Requires: rpm grep bash cpio textutils rpm-build
%description
%{name} allows to build an rpm file from an installed rpm, or from
another rpm file, with or without changes (batch or interactive). It
can be extended by a plugin system. A typical use is to easy repackage
a software after some configuration's change.
%package_help
%prep
%autosetup -c -p1
%build
%make_build
%install
%make_install
chmod a+w $RPM_BUILD_ROOT%{_prefix}/lib/rpmrebuild/rpmrebuild_parser.src
awk '{if (NR==1) print "#!/bin/bash\n" $0; else print $0;}' < $RPM_BUILD_ROOT%{_prefix}/lib/rpmrebuild/rpmrebuild_parser.src > $RPM_BUILD_ROOT%{_prefix}/lib/rpmrebuild/rpmrebuild_parser.src.new
mv $RPM_BUILD_ROOT%{_prefix}/lib/rpmrebuild/rpmrebuild_parser.src.new $RPM_BUILD_ROOT%{_prefix}/lib/rpmrebuild/rpmrebuild_parser.src
chmod a-w $RPM_BUILD_ROOT%{_prefix}/lib/rpmrebuild/rpmrebuild_parser.src
install -d -p $RPM_BUILD_ROOT%{_mandir}/fr/man1/
mv $RPM_BUILD_ROOT%{_mandir}/fr_FR.UTF-8/man1/* $RPM_BUILD_ROOT%{_mandir}/fr/man1/
rm -rf $RPM_BUILD_ROOT%{_mandir}/fr_FR.UTF-8/man1/
%files
%defattr(-,root,root)
%doc AUTHORS COPYING COPYRIGHT
%attr(0755,root,root) %{_bindir}/rpmrebuild
%attr(0755,root,root) %{_prefix}/lib/rpmrebuild/plugins/*.sh
%attr(0755,root,root) %{_prefix}/lib/rpmrebuild/*.src
%attr(0755,root,root) %{_prefix}/lib/rpmrebuild/*.sh
%{_prefix}/lib/rpmrebuild/VERSION
%{_prefix}/lib/rpmrebuild/plugins/*.plug
%{_prefix}/lib/rpmrebuild/locale/*
%files help
%defattr(-,root,root)
%doc Changelog News README Todo
%{_mandir}/man1/*.gz
%{_mandir}/fr_FR/man1/*
%{_mandir}/fr/man1/*.gz
%changelog
* Wed Sep 11 2019 openEuler Buildteam <buildteam@openeuler.org> - 2.11-5
- Package init