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
This commit is contained in:
Alexey Tourbin 2010-08-17 15:21:12 +04:00
parent c6b62ae933
commit 202244526d
6 changed files with 113 additions and 31 deletions

View File

@ -1 +0,0 @@
tar: . name=rpm-4_0-4.0.4

1
.gear/rules Normal file
View File

@ -0,0 +1 @@
tar: . name=rpm-@version@-@release@

101
.gitignore vendored Normal file
View File

@ -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

View File

@ -243,3 +243,5 @@ cscope:
cscope -b -R
cref: ctags cscope
ACLOCAL_AMFLAGS = -I m4

View File

@ -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

View File

@ -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 <ldv@altlinux.org>
# 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}