From 88af0cfd3fc0ea99a4dc8140563aa9db3dc26c5c Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Fri, 30 Nov 2012 19:11:35 +0200 Subject: rpm helpers: support updating tags in the spec file Currently only the 'VCS' tag is supported. Signed-off-by: Markus Lehtonen --- tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec | 1 + .../rpmbuild/SPECS/gbp-test2.spec.orig | 46 +++++++++++++++++++++ tests/test_rpm_data/specs/gbp-test-reference2.spec | 44 ++++++++++++++++++++ .../test_rpm_data/specs/gbp-test2-reference2.spec | 48 ++++++++++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec.orig create mode 100644 tests/test_rpm_data/specs/gbp-test-reference2.spec create mode 100644 tests/test_rpm_data/specs/gbp-test2-reference2.spec (limited to 'tests/test_rpm_data') diff --git a/tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec b/tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec index ffae7e99..4180a877 100644 --- a/tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec +++ b/tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec @@ -13,6 +13,7 @@ Patch: my.patch Patch10: my2.patch Patch20: my3.patch Packager: Markus Lehtonen +VCS: myoldvcstag %description Package for testing the RPM functionality of git-buildpackage. diff --git a/tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec.orig b/tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec.orig new file mode 100644 index 00000000..ffae7e99 --- /dev/null +++ b/tests/test_rpm_data/rpmbuild/SPECS/gbp-test2.spec.orig @@ -0,0 +1,46 @@ +Name: gbp-test2 +Summary: Test package 2 for git-buildpackage +Epoch: 2 +Version: 3.0 +Release: 0 +Group: Development/Libraries +License: GPLv2 +Source10: ftp://ftp.host.com/%{name}-%{version}.tar.gz +Source: foo.txt +Source20: bar.tar.gz +# Gbp-Ignore-Patches: 0 +Patch: my.patch +Patch10: my2.patch +Patch20: my3.patch +Packager: Markus Lehtonen + +%description +Package for testing the RPM functionality of git-buildpackage. + + +%prep +%setup -T -n %{name}-%{version} -c -a 10 + +%patch +%patch -P 10 -p1 + +echo "Do things" + +# Gbp-Patch-Macros + +%build +make + + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_datadir}/%{name} +cp -R * %{buildroot}/%{_datadir}/%{name} +install %{SOURCE0} %{buildroot}/%{_datadir}/%{name} + + + +%files +%defattr(-,root,root,-) +%dir %{_datadir}/%{name} +%{_datadir}/%{name} diff --git a/tests/test_rpm_data/specs/gbp-test-reference2.spec b/tests/test_rpm_data/specs/gbp-test-reference2.spec new file mode 100644 index 00000000..f006fc77 --- /dev/null +++ b/tests/test_rpm_data/specs/gbp-test-reference2.spec @@ -0,0 +1,44 @@ +Name: gbp-test +Summary: Test package for git-buildpackage +Version: 1.0 +Release: 1 +VCS: myvcstag +Group: Development/Libraries +License: GPLv2 +Source: %{name}-%{version}.tar.bz2 +Source1: foo.txt +Source20: bar.tar.gz +# Gbp-Ignore-Patches: 0 +Patch0: my.patch +# Patches auto-generated by git-buildpackage: +Patch1: new.patch + + +%description +Package for testing the RPM functionality of git-buildpackage. + + +%prep +%setup -n %{name} -a 20 + +%patch0 +# new.patch +%patch1 -p1 + + +%build +make + + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_datadir}/%{name} +cp -R * %{buildroot}/%{_datadir}/%{name} +install %{SOURCE0} %{buildroot}/%{_datadir}/%{name} + + + +%files +%defattr(-,root,root,-) +%dir %{_datadir}/%{name} +%{_datadir}/%{name} diff --git a/tests/test_rpm_data/specs/gbp-test2-reference2.spec b/tests/test_rpm_data/specs/gbp-test2-reference2.spec new file mode 100644 index 00000000..02356d0a --- /dev/null +++ b/tests/test_rpm_data/specs/gbp-test2-reference2.spec @@ -0,0 +1,48 @@ +Name: gbp-test2 +Summary: Test package 2 for git-buildpackage +Epoch: 2 +Version: 3.0 +Release: 0 +Group: Development/Libraries +License: GPLv2 +Source10: ftp://ftp.host.com/%{name}-%{version}.tar.gz +Source: foo.txt +Source20: bar.tar.gz +# Gbp-Ignore-Patches: 0 +Patch: my.patch +# Patches auto-generated by git-buildpackage: +Patch1: new.patch +Packager: Markus Lehtonen +VCS: myvcstag + +%description +Package for testing the RPM functionality of git-buildpackage. + + +%prep +%setup -T -n %{name}-%{version} -c -a 10 + +%patch + +echo "Do things" + +# Gbp-Patch-Macros +# new.patch +%patch1 -p1 + +%build +make + + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}/%{_datadir}/%{name} +cp -R * %{buildroot}/%{_datadir}/%{name} +install %{SOURCE0} %{buildroot}/%{_datadir}/%{name} + + + +%files +%defattr(-,root,root,-) +%dir %{_datadir}/%{name} +%{_datadir}/%{name} -- cgit v1.2.3