From 202244526d9ef386a8079619b5d093db21bca739 Mon Sep 17 00:00:00 2001 From: Alexey Tourbin Date: Tue, 17 Aug 2010 15:21:12 +0400 Subject: [PATCH] added .gitignore, improved support for in-tree building Here is how to run configure within the source tree: $ rpm -bE --enable debug *.spec |sed -n '/^%build$/,/^%install$/{/^%build$/d;/^%install$/d;p}' |sh -ex There's still problem: po/Makefile.in is getting added to configure.ac:AC_OUTPUT, and when running autoreconf for the second time, it will die as follows. autoreconf-default: running: aclocal -I m4 --force -I m4 configure.in:896: error: `po/Makefile.in' is already registered with AC_CONFIG_FILES. ../../lib/autoconf/status.m4:290: AC_CONFIG_FILES is expanded from... configure.in:896: the top level autom4te-2.60: /usr/bin/m4 failed with exit status: 1 --- .gear-rules | 1 - .gear/rules | 1 + .gitignore | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 2 + configure.in | 1 + rpm-4_0.spec | 38 ++++--------------- 6 files changed, 113 insertions(+), 31 deletions(-) delete mode 100644 .gear-rules create mode 100644 .gear/rules create mode 100644 .gitignore diff --git a/.gear-rules b/.gear-rules deleted file mode 100644 index 5d82433..0000000 --- a/.gear-rules +++ /dev/null @@ -1 +0,0 @@ -tar: . name=rpm-4_0-4.0.4 diff --git a/.gear/rules b/.gear/rules new file mode 100644 index 0000000..a971851 --- /dev/null +++ b/.gear/rules @@ -0,0 +1 @@ +tar: . name=rpm-@version@-@release@ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5475f96 --- /dev/null +++ b/.gitignore @@ -0,0 +1,101 @@ +*.o +*.lo +*.la +.libs + +Makefile +Makefile.in + +/ABOUT-NLS +/Doxyfile +/aclocal.m4 +/autom4te.cache +/config.* +/configure +/depcomp +/install-sh +/libtool +/ltmain.sh +/m4 +/missing +/mkinstalldirs +/stamp-h.in +/stamp-h1 + +/macros +/platform +/rpmpopt +/rpmpopt-4.0.4 +/rpmrc + +/lib/getdate.c +/rpmdb/tagtbl.c + +/rpm +/rpm.static +/rpm2cpio +/rpm2cpio.static +/rpmb +/rpmd +/rpmi +/rpmk +/rpmq + +/CHANGES.bz2 +/rpm.lang + +/@RPMCONFIGDIR@ + +/tags + +/po/Makefile.in.in +/po/Makevars +/po/POTFILES +/po/ru.gmo +/po/stamp-po + +/scripts/*.req +/scripts/*.prov +/scripts/brp-adjust_libraries +/scripts/brp-alt +/scripts/brp-bytecompile_python +/scripts/brp-cleanup +/scripts/brp-compress +/scripts/brp-fix-perms +/scripts/brp-fixup +/scripts/brp-strip +/scripts/brp-verify-info +/scripts/brp-verify_elf +/scripts/check-files +/scripts/compress_files +/scripts/files.req.files +/scripts/find-lang +/scripts/find-package +/scripts/find-scriptlet-requires +/scripts/fixup-binconfig +/scripts/fixup-libtool +/scripts/fixup-pkgconfig +/scripts/ldd +/scripts/posttrans-filetriggers +/scripts/rpmlib.req.files +/scripts/strip_files +/scripts/verify-elf + +/tools/dump +/tools/dump_ld_config +/tools/dumpdb +/tools/filesize +/tools/javadeps +/tools/pdeath_execute +/tools/relative +/tools/rpmarchive +/tools/rpmevrcmp +/tools/rpmheader +/tools/rpmlead +/tools/rpmsignature +/tools/rpmvercmp + +/autodeps/linux.prov +/autodeps/linux.req +/find-provides +/find-requires diff --git a/Makefile.am b/Makefile.am index c76c1c2..c85b121 100644 --- a/Makefile.am +++ b/Makefile.am @@ -243,3 +243,5 @@ cscope: cscope -b -R cref: ctags cscope + +ACLOCAL_AMFLAGS = -I m4 diff --git a/configure.in b/configure.in index bfd6f49..af58b5a 100644 --- a/configure.in +++ b/configure.in @@ -941,5 +941,6 @@ AC_OUTPUT([ Doxyfile Makefile rpmrc macros platform rpmpopt ] ) +rm -f find-provides find-requires ln -s ${srcdir}/autodeps/linux.prov ./find-provides ln -s ${srcdir}/autodeps/linux.req ./find-requires diff --git a/rpm-4_0.spec b/rpm-4_0.spec index b81c800..bc87739 100644 --- a/rpm-4_0.spec +++ b/rpm-4_0.spec @@ -1,9 +1,8 @@ -%define rpm_name rpm +# python-module-rpm overrides %%version %define rpm_version 4.0.4 -%define srcname %rpm_name-4_0-%rpm_version -Name: %rpm_name -Version: %rpm_version +Name: rpm +Version: 4.0.4 Release: alt98.41 %define ifdef() %if %{expand:%%{?%{1}:1}%%{!?%{1}:0}} @@ -31,7 +30,7 @@ Url: http://www.rpm.org/ Packager: Dmitry V. Levin # http://git.altlinux.org/people/ldv/packages/?p=rpm.git -Source: %srcname.tar +Source: rpm-%version-%release.tar Provides: %_rpmlibdir/macros.d, %_sysconfdir/%name/macros.d @@ -197,16 +196,11 @@ the Python programming language to use the interface supplied by RPM %endif #with python %prep -%setup -q -n %srcname - -find -type d -name CVS -print0 | - xargs -r0 rm -rf -- -find -type f \( -name .cvsignore -o -name \*~ -o -name \*.orig \) -print0 | - xargs -r0 rm -f -- +%setup -q -n rpm-%rpm_version-%release %build touch config.rpath -gettextize --force --quiet +gettextize --force --quiet --no-changelog --symlink install -pv -m644 /usr/share/automake/mkinstalldirs . install -pv -m644 /usr/share/gettext/intl/Makevars* po/Makevars autoreconf -fisv -I m4 @@ -223,22 +217,6 @@ export ac_cv_path___SSH=/usr/bin/ssh %{?_with_db} %{?_without_db} \ --program-transform-name= -# fix buggy requires if any -find scripts -type f -print0 | - xargs -r0 grep -EZl '(/usr/ucb|/usr/local/bin/perl|/usr/local/lib/rpm/bash)' -- | - xargs -r0 subst 's|/usr/ucb|%_bindir|g;s|/usr/local/bin/perl|/usr/bin/perl|g;s|/usr/local/lib/rpm/bash|/bin/sh|g' -- -find -type f -print0 | - xargs -r0 grep -FZl /usr/sbin/lsattr -- | - xargs -r0 subst 's|/usr/sbin/lsattr|/usr/bin/lsattr|g' -- - -# fix vendor -find -type f -print0 | - xargs -r0 grep -FZl '%_host_cpu-pc-%_host_os' -- | - xargs -r0 subst 's/%_host_cpu-pc-%_host_os/%_host_cpu-alt-%_host_os/g' -- -find -type f -name config.\* -print0 | - xargs -r0 grep -FZl '=pc' -- | - xargs -r0 subst 's/=pc/=alt/g' -- - %make_build YACC='bison -y' %if_with apidocs rm -rf apidocs @@ -275,9 +253,9 @@ done touch %buildroot%_localstatedir/%name/files-awaiting-filetriggers # Prepare documentation. -bzip2 -9 CHANGES ||: +bzip2 -9k CHANGES ||: mkdir -p %buildroot%_docdir/%name-%rpm_version -install -p -m644 CHANGES* CREDITS README README.ALT* \ +install -p -m644 CHANGES.bz2 CREDITS README README.ALT* \ %buildroot%_docdir/%name-%rpm_version/ cp -a doc/manual %buildroot%_docdir/%name-%rpm_version/ rm -f %buildroot%_docdir/%name-%rpm_version/manual/{Makefile*,buildroot}