[packages/debbuild] up to 16.3.0; new upstream

glen glen at pld-linux.org
Thu Apr 7 08:31:49 CEST 2016


commit 73c9c3fc6bb92b32d2e21f841d1ce1dc74f24fd7
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Thu Apr 7 09:31:38 2016 +0300

    up to 16.3.0; new upstream

 debbuild.spec | 43 ++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 38 insertions(+), 5 deletions(-)
---
diff --git a/debbuild.spec b/debbuild.spec
index 5641a70..b60934f 100644
--- a/debbuild.spec
+++ b/debbuild.spec
@@ -1,13 +1,15 @@
+# TODO
+# - not sure why %post can't be done at package time?
 %include	/usr/lib/rpm/macros.perl
 Summary:	Build Debian-compatible .deb packages from RPM .spec files
 Name:		debbuild
-Version:	0.11.3
+Version:	16.3.0
 Release:	0.1
 License:	GPL v2+
 Group:		Applications/File
-Source0:	https://secure.deepnet.cx/releases/debbuild/%{name}-%{version}.tar.gz
-# Source0-md5:	adddf00c1ed1bc062f25accd2b479946
-URL:		https://secure.deepnet.cx/trac/debbuild
+Source0:	https://github.com/ascherer/debbuild/archive/%{name}-%{version}.tar.gz
+# Source0-md5:	099010960031910df27f1584456dea49
+URL:		https://github.com/ascherer/debbuild
 #BuildRequires:	perl-podlators
 BuildRequires:	rpm-perlprov >= 4.1-13
 Requires:	bash
@@ -27,17 +29,48 @@ RPM spec files, RPM-friendly tarballs, and RPM source packages
 should be able to interpret most spec files usefully.
 
 %prep
-%setup -q
+%setup -qn %{name}-%{name}-%{version}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/macros.d
+cp -p macros/macros.in $RPM_BUILD_ROOT%{_libdir}/%{name}/macros
+cp -p macros/macros.perl $RPM_BUILD_ROOT%{_libdir}/%{name}/macros.d
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+cp -p macros/macros.sysutils $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+cp -p macros/macros.texlive $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+# this sciptlet originates from scripts/post.sh from sourcecode
+%define darch %{__dpkg_architecture}
+
+if [ -x %{darch} ]; then
+	DEB_HOST_CPU=$(%{darch} -qDEB_HOST_GNU_CPU 2>/dev/null)
+	DEB_HOST_OS=$(%{darch} -qDEB_HOST_ARCH_OS 2>/dev/null)
+	DEB_HOST_SYSTEM=$(%{darch} -qDEB_HOST_GNU_SYSTEM 2>/dev/null)
+	DEB_HOST_ARCH=$(%{darch} -qDEB_HOST_ARCH_CPU 2>/dev/null)
+	DEB_BUILD_ARCH=$(%{darch} -qDEB_BUILD_ARCH 2>/dev/null)
+
+	%{__sed} -e "s/@HOST_ARCH@/${DEB_HOST_ARCH}/g" \
+			 -e "s/@BUILD_ARCH@/${DEB_BUILD_ARCH}/g" \
+			 -e "s/@HOST_CPU@/${DEB_HOST_CPU}/g" \
+			 -e "s/@HOST_OS@/${DEB_HOST_OS}/g" \
+			 -e "s/@HOST_SYSTEM@/${DEB_HOST_SYSTEM}/g" \
+			 -i %{_libdir}/%{name}/macros
+fi
+
 %files
 %defattr(644,root,root,755)
+%dir %{_sysconfdir}/%{name}
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/macros.*
 %attr(755,root,root) %{_bindir}/%{name}
 %{_mandir}/man8/%{name}.8*
+%dir %{_libdir}/%{name}
+%{_libdir}/%{name}/macros
+%{_libdir}/%{name}/macros.d
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/debbuild.git/commitdiff/73c9c3fc6bb92b32d2e21f841d1ce1dc74f24fd7



More information about the pld-cvs-commit mailing list