diff --git a/python3-rpm.changes b/python3-rpm.changes index 76d3e01..04d7fe1 100644 --- a/python3-rpm.changes +++ b/python3-rpm.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jan 17 10:29:20 UTC 2012 - saschpe@suse.de + +- Spec file cleanup: + * Don't rm -rf %{buildroot} + * Removed %clean section + * Removed authors from description + ------------------------------------------------------------------- Mon Jan 9 17:12:41 CET 2012 - dmueller@suse.de diff --git a/python3-rpm.spec b/python3-rpm.spec index 806d504..5b826aa 100644 --- a/python3-rpm.spec +++ b/python3-rpm.spec @@ -15,7 +15,15 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: python3-rpm +Version: 4.9.1.2 +Release: 0 +#!BuildIgnore: rpmlint-Factory +Summary: Python Bindings for Manipulating RPM Packages +License: GPL-2.0+ +Group: System/Packages +Source99: rpm.spec BuildRequires: file-devel BuildRequires: libacl-devel BuildRequires: libbz2-devel @@ -30,14 +38,7 @@ BuildRequires: popt-devel BuildRequires: python3-devel BuildRequires: xz-devel BuildRequires: zlib-devel -#!BuildIgnore: rpmlint-Factory -Summary: Python Bindings for Manipulating RPM Packages -License: GPL-2.0+ -Group: System/Packages -Version: 4.9.1.2 -Release: 0 Requires: rpm = %{version} -Source99: rpm.spec %{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} %global with_python 1 @@ -49,32 +50,21 @@ supplied by RPM Package Manager libraries. This package should be installed if you want to develop Python programs that will manipulate RPM packages and databases. - - -Authors: --------- - Erik Troan - Marc Ewing - %prep %{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')} %install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/usr/lib +mkdir -p %{buildroot}%{_prefix}/lib # only installing in python/ does not work because rpm links against # installed libs at install time -make DESTDIR="$RPM_BUILD_ROOT" install -find "%{buildroot}" -not -type d -and -not -path %{buildroot}%{_libdir}/python3*/site-packages/rpm/\* -print0 | xargs -0 rm -pushd $RPM_BUILD_ROOT/%_libdir/python3*/site-packages/rpm +%make_install +find %{buildroot} -not -type d -and -not -path %{buildroot}%{_libdir}/python3*/site-packages/rpm/\* -print0 | xargs -0 rm +pushd %{buildroot}/%{_libdir}/python3*/site-packages/rpm rm -f _rpmmodule.a _rpmmodule.la -python3 %_libdir/python3*/py_compile.py *.py -python3 -O %_libdir/python3*/py_compile.py *.py +python3 %{_libdir}/python3*/py_compile.py *.py +python3 -O %{_libdir}/python3*/py_compile.py *.py popd -%clean -rm -rf $RPM_BUILD_ROOT - %files %defattr(-,root,root) %{_libdir}/python*/*/* diff --git a/rpm-python.changes b/rpm-python.changes index b332280..14132e7 100644 --- a/rpm-python.changes +++ b/rpm-python.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Jan 17 10:28:42 UTC 2012 - saschpe@suse.de + +- Spec file cleanup: + * Don't rm -rf %{buildroot} + * Removed %clean section + * Removed authors from description + ------------------------------------------------------------------- Sun Dec 11 09:28:28 UTC 2011 - coolo@suse.com diff --git a/rpm-python.spec b/rpm-python.spec index 4178715..5af67c9 100644 --- a/rpm-python.spec +++ b/rpm-python.spec @@ -15,7 +15,15 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm-python +Version: 4.9.1.2 +Release: 0 +#!BuildIgnore: rpmlint-Factory +Summary: Python Bindings for Manipulating RPM Packages +License: GPL-2.0+ +Group: System/Packages +Source99: rpm.spec BuildRequires: file-devel BuildRequires: libacl-devel BuildRequires: libbz2-devel @@ -30,15 +38,8 @@ BuildRequires: popt-devel BuildRequires: python-devel BuildRequires: xz-devel BuildRequires: zlib-devel -#!BuildIgnore: rpmlint-Factory -Summary: Python Bindings for Manipulating RPM Packages -License: GPL-2.0+ -Group: System/Packages -Version: 4.9.1.2 -Release: 0 Requires: rpm = %{version} %py_requires -Source99: rpm.spec %{expand:%(sed -n -e '/^Source:/,/^BuildRoot:/p' <%_sourcedir/rpm.spec)} %global with_python 1 @@ -50,32 +51,21 @@ supplied by RPM Package Manager libraries. This package should be installed if you want to develop Python programs that will manipulate RPM packages and databases. - - -Authors: --------- - Erik Troan - Marc Ewing - %prep %{expand:%(sed -n -e '/^%%prep/,/^%%install/p' <%_sourcedir/rpm.spec | sed -e '1d' -e '$d')} %install -rm -rf $RPM_BUILD_ROOT -mkdir -p $RPM_BUILD_ROOT/usr/lib +mkdir -p %{buildroot}%{_prefix}/lib # only installing in python/ does not work because rpm links against # installed libs at install time -make DESTDIR="$RPM_BUILD_ROOT" install -find "%{buildroot}" -not -type d -and -not -path %{buildroot}%{_libdir}/python%{py_ver}/site-packages/rpm/\* -print0 | xargs -0 rm -pushd $RPM_BUILD_ROOT/%py_sitedir/rpm +%make_install +find %{buildroot} -not -type d -and -not -path %{buildroot}%{_libdir}/python%{py_ver}/site-packages/rpm/\* -print0 | xargs -0 rm +pushd %{buildroot}/%py_sitedir/rpm rm -f _rpmmodule.a _rpmmodule.la python %py_libdir/py_compile.py *.py python -O %py_libdir/py_compile.py *.py popd -%clean -rm -rf $RPM_BUILD_ROOT - %files %defattr(-,root,root) %{_libdir}/python*/*/* diff --git a/rpm.changes b/rpm.changes index 40548e0..4fd283c 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Tue Jan 17 10:28:00 UTC 2012 - saschpe@suse.de + +- Spec file cleanup: + * Removed authors from description + * Spec-cleaner + ------------------------------------------------------------------- Mon Jan 16 16:18:59 UTC 2012 - lnussel@suse.de diff --git a/rpm.spec b/rpm.spec index d6dbda7..7d0e027 100644 --- a/rpm.spec +++ b/rpm.spec @@ -15,6 +15,7 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # + Name: rpm BuildRequires: file-devel BuildRequires: libacl-devel @@ -211,7 +212,7 @@ rm -f m4/libtool.m4 rm -f m4/lt*.m4 %build -export CFLAGS="$RPM_OPT_FLAGS -ffunction-sections" +export CFLAGS="%{optflags} -ffunction-sections" export LDFLAGS="-Wl,-Bsymbolic-functions -ffunction-sections" %ifarch alpha armv5tel export CFLAGS="-g -O0 -fno-strict-aliasing -ffunction-sections" @@ -242,58 +243,58 @@ make %{?_smp_mflags} make convertdb1 %install -mkdir -p $RPM_BUILD_ROOT/usr/lib -mkdir -p $RPM_BUILD_ROOT/usr/share/locale -ln -s ../share/locale $RPM_BUILD_ROOT/usr/lib/locale -make DESTDIR="$RPM_BUILD_ROOT" install -install -m 755 convertdb1 $RPM_BUILD_ROOT/usr/lib/rpm -install -m 644 db3/db.h $RPM_BUILD_ROOT/usr/include/rpm +mkdir -p %{buildroot}/usr/lib +mkdir -p %{buildroot}/usr/share/locale +ln -s ../share/locale %{buildroot}/usr/lib/locale +%make_install +install -m 755 convertdb1 %{buildroot}/usr/lib/rpm +install -m 644 db3/db.h %{buildroot}/usr/include/rpm # remove .la file and the static variant of libpopt # have to remove the dependency from other .la files as well -for f in $RPM_BUILD_ROOT/%{_libdir}/*.la; do +for f in %{buildroot}/%{_libdir}/*.la; do sed -i -e "s,/%_lib/libpopt.la,-lpopt,g" $f done -mkdir -p $RPM_BUILD_ROOT/etc/init.d -install -m 755 %{SOURCE8} $RPM_BUILD_ROOT/etc/init.d -mkdir -p $RPM_BUILD_ROOT/usr/sbin -ln -sf ../../etc/init.d/rpmconfigcheck $RPM_BUILD_ROOT/usr/sbin/rcrpmconfigcheck -cp -a suse_macros $RPM_BUILD_ROOT/usr/lib/rpm -mkdir -p $RPM_BUILD_ROOT/usr/lib/rpm/suse -ln -s ../suse_macros $RPM_BUILD_ROOT/usr/lib/rpm/suse/macros +mkdir -p %{buildroot}/etc/init.d +install -m 755 %{SOURCE8} %{buildroot}/etc/init.d +mkdir -p %{buildroot}/usr/sbin +ln -sf ../../etc/init.d/rpmconfigcheck %{buildroot}/usr/sbin/rcrpmconfigcheck +cp -a suse_macros %{buildroot}/usr/lib/rpm +mkdir -p %{buildroot}/usr/lib/rpm/suse +ln -s ../suse_macros %{buildroot}/usr/lib/rpm/suse/macros for d in BUILD RPMS SOURCES SPECS SRPMS BUILDROOT ; do - mkdir -p $RPM_BUILD_ROOT/usr/src/packages/$d - chmod 755 $RPM_BUILD_ROOT/usr/src/packages/$d + mkdir -p %{buildroot}/usr/src/packages/$d + chmod 755 %{buildroot}/usr/src/packages/$d done -for d in $RPM_BUILD_ROOT/usr/lib/rpm/platform/*-linux/macros ; do +for d in %{buildroot}/usr/lib/rpm/platform/*-linux/macros ; do dd=${d%%-linux/macros} dd=${dd##*/} - mkdir $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd - chmod 755 $RPM_BUILD_ROOT/usr/src/packages/RPMS/$dd + mkdir %{buildroot}/usr/src/packages/RPMS/$dd + chmod 755 %{buildroot}/usr/src/packages/RPMS/$dd done -mkdir -p $RPM_BUILD_ROOT/var/lib/rpm -gzip -9 $RPM_BUILD_ROOT/%{_mandir}/man[18]/*.[18] +mkdir -p %{buildroot}/var/lib/rpm +gzip -9 %{buildroot}/%{_mandir}/man[18]/*.[18] export RPM_BUILD_ROOT %ifarch s390x [ -f scripts/brp-%_arch-linux ] && sh scripts/brp-%_arch-linux %endif chmod 755 doc/manual rm -rf doc/manual/Makefile* -rm -f $RPM_BUILD_ROOT/usr/lib/rpmpopt -rm -rf $RPM_BUILD_ROOT%{_mandir}/{fr,ja,ko,pl,ru,sk} -rm -f $RPM_BUILD_ROOT%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo -mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates -install -c -m0644 %{SOURCE9} $RPM_BUILD_ROOT/var/adm/fillup-templates/ -rm -f $RPM_BUILD_ROOT/usr/lib/rpm/cpanflute $RPM_BUILD_ROOT/usr/lib/rpm/cpanflute2 -install -m 755 %{SOURCE5} $RPM_BUILD_ROOT/usr/lib/rpm -install -m 755 %{SOURCE6} $RPM_BUILD_ROOT/usr/lib/rpm -install -m 755 scripts/find-supplements{,.ksyms} $RPM_BUILD_ROOT/usr/lib/rpm -install -m 755 scripts/firmware.prov $RPM_BUILD_ROOT/usr/lib/rpm -install -m 755 scripts/debuginfo.prov $RPM_BUILD_ROOT/usr/lib/rpm -rm -f $RPM_BUILD_ROOT/usr/lib/locale $RPM_BUILD_ROOT/usr/lib/rpmrc -mkdir -p $RPM_BUILD_ROOT/etc/rpm -chmod 755 $RPM_BUILD_ROOT/etc/rpm +rm -f %{buildroot}/usr/lib/rpmpopt +rm -rf %{buildroot}%{_mandir}/{fr,ja,ko,pl,ru,sk} +rm -f %{buildroot}%{_prefix}/share/locale/de/LC_MESSAGES/rpm.mo +mkdir -p %{buildroot}/var/adm/fillup-templates +install -c -m0644 %{SOURCE9} %{buildroot}/var/adm/fillup-templates/ +rm -f %{buildroot}/usr/lib/rpm/cpanflute %{buildroot}/usr/lib/rpm/cpanflute2 +install -m 755 %{SOURCE5} %{buildroot}/usr/lib/rpm +install -m 755 %{SOURCE6} %{buildroot}/usr/lib/rpm +install -m 755 scripts/find-supplements{,.ksyms} %{buildroot}/usr/lib/rpm +install -m 755 scripts/firmware.prov %{buildroot}/usr/lib/rpm +install -m 755 scripts/debuginfo.prov %{buildroot}/usr/lib/rpm +rm -f %{buildroot}/usr/lib/locale %{buildroot}/usr/lib/rpmrc +mkdir -p %{buildroot}/etc/rpm +chmod 755 %{buildroot}/etc/rpm # remove some nonsense or non-working scripts -pushd $RPM_BUILD_ROOT/usr/lib/rpm/ +pushd %{buildroot}/usr/lib/rpm/ for f in rpm2cpio.sh rpm.daily rpmdiff* rpm.log rpm.xinetd freshen.sh u_pkg.sh \ magic magic.mgc magic.mime* rpmfile *.pl javadeps brp-redhat \ brp-strip-static-archive vpkg-provides*.sh http.req sql.req tcl.req \ @@ -308,20 +309,17 @@ for i in /usr/share/automake-*/*; do done popd gzip -9 CHANGES -rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{py_ver} -rm -f $RPM_BUILD_ROOT%{_libdir}/*.la -rm -f $RPM_BUILD_ROOT%{_libdir}/rpm-plugins/*.la -sh $RPM_BUILD_ROOT/usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT rpm +rm -rf %{buildroot}/%{_libdir}/python%{py_ver} +rm -f %{buildroot}%{_libdir}/*.la +rm -f %{buildroot}%{_libdir}/rpm-plugins/*.la +sh %{buildroot}/usr/lib/rpm/find-lang.sh %{buildroot} rpm %ifarch armv7hl # rpm is using the host_cpu as default for the platform, but armv7hl is not known by the kernel. # so we need to enforce the platform here. # We don't want to use armv7l because it would make us incompatible to Fedora and MeeGo plattforms. -echo -n armv7hl-suse-linux> $RPM_BUILD_ROOT/etc/rpm/platform +echo -n armv7hl-suse-linux> %{buildroot}/etc/rpm/platform %endif -%clean -rm -rf $RPM_BUILD_ROOT - %post %{fillup_only -an services} test -f var/lib/rpm/Packages || rpm --initdb