aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2005-04-29 03:14:31 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2005-04-29 03:14:31 +0000
commitc1e98e63ced7c7cf0a96eb7344dce8c70a2374a3 (patch)
treee7dc6d41932984de61e19b5c31645adef2873166
parent0476b45b8e1efd8ceba51446bbe5312935726e49 (diff)
- remove Makefile.in from cvs0.1
- more scripts - version is 0.1 (in way) - use spec-helper at time
-rw-r--r--Makefile.am11
-rw-r--r--Makefile.in526
-rwxr-xr-xbrp-compress2
-rwxr-xr-xbrp-strip-static-archive13
-rw-r--r--configure.ac2
-rwxr-xr-xhttp.req165
-rw-r--r--macros.in11
-rwxr-xr-xmagic.prov167
-rwxr-xr-xmagic.req143
-rwxr-xr-xperl.prov180
-rwxr-xr-xperl.req234
-rw-r--r--rpm-mandriva-setup.spec2
-rw-r--r--rpmrc.in1
13 files changed, 922 insertions, 535 deletions
diff --git a/Makefile.am b/Makefile.am
index 1eea864..0e82414 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,9 +12,16 @@ pkg_scripts = \
brp-compress \
brp-strip \
brp-strip-comment-note \
+ brp-strip-static-archive \
filter.sh \
find-lang.sh \
- find-debuginfo.sh
+ find-debuginfo.sh \
+ http.req \
+ magic.prov \
+ magic.req \
+ perl.prov \
+ perl.req
+
pkg_gscripts = \
find-provides \
find-requires \
@@ -63,7 +70,7 @@ install-data-local: $(macrosfiles)
.PHONY: rpm
rpm: dist
gzip -dc $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz | bzip2 > $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2
- rpm -ba --define "_sourcedir `pwd`" rpm-mandriva-setup.spec
+ rpmbuild -ba --define "_sourcedir `pwd`" rpm-mandriva-setup.spec
CLEANFILES = $(pkg_gdata) $(pkg_gscripts) $(macrosfiles) \
macros-perarch \
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index 4004e2b..0000000
--- a/Makefile.in
+++ /dev/null
@@ -1,526 +0,0 @@
-# Makefile.in generated by automake 1.9.4 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# $Id$
-
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = .
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in $(top_srcdir)/configure AUTHORS COPYING \
- ChangeLog INSTALL NEWS config.guess config.sub install-sh \
- ltmain.sh missing
-subdir = .
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
- configure.lineno configure.status.lineno
-mkinstalldirs = $(install_sh) -d
-CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(pkglibdir)"
-pkglibSCRIPT_INSTALL = $(INSTALL_SCRIPT)
-SCRIPTS = $(pkglib_SCRIPTS)
-SOURCES =
-DIST_SOURCES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
- *) f=$$p;; \
- esac;
-am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
-pkglibDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(pkglib_DATA)
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(distdir)
-am__remove_distdir = \
- { test ! -d $(distdir) \
- || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr $(distdir); }; }
-DIST_ARCHIVES = $(distdir).tar.gz
-GZIP_ENV = --best
-distuninstallcheck_listfiles = find . -type f -print
-distcleancheck_listfiles = find . -type f -print
-pkglibdir = @RPMVENDORDIR@
-ACLOCAL = @ACLOCAL@
-AMTAR = @AMTAR@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LTLIBOBJS = @LTLIBOBJS@
-MAKEINFO = @MAKEINFO@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-RPMALLARCH = @RPMALLARCH@
-RPMCONFDIR = @RPMCONFDIR@
-RPMLIBDIR = @RPMLIBDIR@
-RPMOS = @RPMOS@
-RPMSYSCONFDIR = @RPMSYSCONFDIR@
-RPMVENDOR = @RPMVENDOR@
-RPMVENDORDIR = @RPMVENDORDIR@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-VERSION = @VERSION@
-ac_ct_STRIP = @ac_ct_STRIP@
-am__leading_dot = @am__leading_dot@
-am__tar = @am__tar@
-am__untar = @am__untar@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-sysconfdir = @sysconfdir@
-target = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-macrosfiles = $(RPMALLARCH:=.macros)
-pkg_data =
-pkg_gdata = \
- rpmrc \
- macros
-
-pkg_data_in = $(pkg_gdata:=.in)
-pkg_scripts = \
- brp-compress \
- brp-strip \
- brp-strip-comment-note \
- filter.sh \
- find-lang.sh \
- find-debuginfo.sh
-
-pkg_gscripts = \
- find-provides \
- find-requires \
- find-provides.perl
-
-pkg_scripts_in = $(pkg_gscripts:=.in)
-BUILT_SOURCES = macros-perarch make_macrosfiles.sh
-pkglib_DATA = \
- $(pkg_data) \
- $(pkg_gdata)
-
-pkglib_SCRIPTS = \
- $(pkg_scripts) \
- $(pkg_gscripts)
-
-EXTRA_DIST = \
- $(pkg_data) \
- $(pkg_data_in) \
- $(pkg_scripts) \
- $(pkg_scripts_in) \
- macros-perarch.in make_macrosfiles.sh.in
-
-edit = sed \
- -e 's,@RPMVENDOR\@,$(RPMVENDOR),g' \
- -e 's,@RPMVENDORDIR\@,$(RPMVENDORDIR),g' \
- -e 's,@RPMLIBDIR\@,$(RPMLIBDIR),g' \
- -e 's,@RPMSYSCONFDIR\@,$(RPMSYSCONFDIR),g'\
- -e 's,@RPMOS\@,$(RPMOS),g'
-
-CLEANFILES = $(pkg_gdata) $(pkg_gscripts) $(macrosfiles) \
- macros-perarch \
- make_macrosfiles.sh
-
-all: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) all-am
-
-.SUFFIXES:
-am--refresh:
- @:
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
- cd $(srcdir) && $(AUTOMAKE) --gnu \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- echo ' $(SHELL) ./config.status'; \
- $(SHELL) ./config.status;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- $(SHELL) ./config.status --recheck
-
-$(top_srcdir)/configure: $(am__configure_deps)
- cd $(srcdir) && $(AUTOCONF)
-$(ACLOCAL_M4): $(am__aclocal_m4_deps)
- cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
-install-pkglibSCRIPTS: $(pkglib_SCRIPTS)
- @$(NORMAL_INSTALL)
- test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)"
- @list='$(pkglib_SCRIPTS)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- if test -f $$d$$p; then \
- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " $(pkglibSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
- $(pkglibSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
- else :; fi; \
- done
-
-uninstall-pkglibSCRIPTS:
- @$(NORMAL_UNINSTALL)
- @list='$(pkglib_SCRIPTS)'; for p in $$list; do \
- f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
- echo " rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
- rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
- done
-uninstall-info-am:
-install-pkglibDATA: $(pkglib_DATA)
- @$(NORMAL_INSTALL)
- test -z "$(pkglibdir)" || $(mkdir_p) "$(DESTDIR)$(pkglibdir)"
- @list='$(pkglib_DATA)'; for p in $$list; do \
- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
- f=$(am__strip_dir) \
- echo " $(pkglibDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkglibdir)/$$f'"; \
- $(pkglibDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkglibdir)/$$f"; \
- done
-
-uninstall-pkglibDATA:
- @$(NORMAL_UNINSTALL)
- @list='$(pkglib_DATA)'; for p in $$list; do \
- f=$(am__strip_dir) \
- echo " rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \
- rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \
- done
-tags: TAGS
-TAGS:
-
-ctags: CTAGS
-CTAGS:
-
-
-distdir: $(DISTFILES)
- $(am__remove_distdir)
- mkdir $(distdir)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
- -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \
- ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
- ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \
- || chmod -R a+r $(distdir)
-dist-gzip: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
-
-dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
- $(am__remove_distdir)
-
-dist-tarZ: distdir
- tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
- $(am__remove_distdir)
-
-dist-shar: distdir
- shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
- $(am__remove_distdir)
-
-dist-zip: distdir
- -rm -f $(distdir).zip
- zip -rq $(distdir).zip $(distdir)
- $(am__remove_distdir)
-
-dist dist-all: distdir
- tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
- $(am__remove_distdir)
-
-# This target untars the dist file and tries a VPATH configuration. Then
-# it guarantees that the distribution is self-contained by making another
-# tarfile.
-distcheck: dist
- case '$(DIST_ARCHIVES)' in \
- *.tar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\
- *.tar.bz2*) \
- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
- *.tar.Z*) \
- uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
- *.shar.gz*) \
- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
- *.zip*) \
- unzip $(distdir).zip ;;\
- esac
- chmod -R a-w $(distdir); chmod a+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
- chmod a-w $(distdir)
- dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
- && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
- && cd $(distdir)/_build \
- && ../configure --srcdir=.. --prefix="$$dc_install_base" \
- $(DISTCHECK_CONFIGURE_FLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) \
- && $(MAKE) $(AM_MAKEFLAGS) dvi \
- && $(MAKE) $(AM_MAKEFLAGS) check \
- && $(MAKE) $(AM_MAKEFLAGS) install \
- && $(MAKE) $(AM_MAKEFLAGS) installcheck \
- && $(MAKE) $(AM_MAKEFLAGS) uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
- distuninstallcheck \
- && chmod -R a-w "$$dc_install_base" \
- && ({ \
- (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
- && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
- distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
- } || { rm -rf "$$dc_destdir"; exit 1; }) \
- && rm -rf "$$dc_destdir" \
- && $(MAKE) $(AM_MAKEFLAGS) dist \
- && rm -rf $(DIST_ARCHIVES) \
- && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
- $(am__remove_distdir)
- @(echo "$(distdir) archives ready for distribution: "; \
- list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
- sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}'
-distuninstallcheck:
- @cd $(distuninstallcheck_dir) \
- && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
- || { echo "ERROR: files left after uninstall:" ; \
- if test -n "$(DESTDIR)"; then \
- echo " (check DESTDIR support)"; \
- fi ; \
- $(distuninstallcheck_listfiles) ; \
- exit 1; } >&2
-distcleancheck: distclean
- @if test '$(srcdir)' = . ; then \
- echo "ERROR: distcleancheck can only run from a VPATH build" ; \
- exit 1 ; \
- fi
- @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
- || { echo "ERROR: files left in build directory after distclean:" ; \
- $(distcleancheck_listfiles) ; \
- exit 1; } >&2
-check-am: all-am
-check: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) check-am
-all-am: Makefile $(SCRIPTS) $(DATA)
-installdirs:
- for dir in "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(pkglibdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: $(BUILT_SOURCES)
- $(MAKE) $(AM_MAKEFLAGS) install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
- -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
- -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-clean: clean-am
-
-clean-am: clean-generic mostlyclean-am
-
-distclean: distclean-am
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -f Makefile
-distclean-am: clean-am distclean-generic
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am: install-data-local
-
-install-exec-am: install-pkglibDATA install-pkglibSCRIPTS
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -f $(am__CONFIG_DISTCLEAN_FILES)
- -rm -rf $(top_srcdir)/autom4te.cache
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-generic
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-pkglibDATA \
- uninstall-pkglibSCRIPTS
-
-.PHONY: all all-am am--refresh check check-am clean clean-generic dist \
- dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \
- distcheck distclean distclean-generic distcleancheck distdir \
- distuninstallcheck dvi dvi-am html html-am info info-am \
- install install-am install-data install-data-am \
- install-data-local install-exec install-exec-am install-info \
- install-info-am install-man install-pkglibDATA \
- install-pkglibSCRIPTS install-strip installcheck \
- installcheck-am installdirs maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \
- uninstall-pkglibDATA uninstall-pkglibSCRIPTS
-
-
-%: %.in Makefile
- $(edit) $< > $@
-
-%.macros: macros-perarch make_macrosfiles.sh
- arch=`echo $@ | sed 's,\\.macros,,'`; \
- sh ./make_macrosfiles.sh macros-perarch $$arch > $@
-
-install-data-local: $(macrosfiles)
- for i in $(RPMALLARCH); do \
- $(mkinstalldirs) $(DESTDIR)$(RPMVENDORDIR)/$${i}-$(RPMOS); \
- $(install_sh_DATA) $${i}.macros $(DESTDIR)$(RPMVENDORDIR)/$${i}-$(RPMOS)/macros; \
- done
-
-.PHONY: rpm
-rpm: dist
- gzip -dc $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.gz | bzip2 > $(PACKAGE_TARNAME)-$(PACKAGE_VERSION).tar.bz2
- rpm -ba --define "_sourcedir `pwd`" rpm-mandriva-setup.spec
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/brp-compress b/brp-compress
index e409c26..4b27acd 100755
--- a/brp-compress
+++ b/brp-compress
@@ -10,7 +10,7 @@ fi
cd $RPM_BUILD_ROOT
# Compress man pages
-COMPRESS="bzip2 -9 -n"
+COMPRESS="bzip2 -9"
COMPRESS_EXT=.bz2
for d in ./usr/man/man* ./usr/man/*/man* ./usr/info \
diff --git a/brp-strip-static-archive b/brp-strip-static-archive
new file mode 100755
index 0000000..6831239
--- /dev/null
+++ b/brp-strip-static-archive
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
+ exit 0
+fi
+
+# Strip static libraries.
+for f in `find $RPM_BUILD_ROOT -type f -a -exec file {} \; | \
+ grep -v "^${RPM_BUILD_ROOT}/\?usr/lib/debug" | \
+ grep 'current ar archive' | \
+ sed -n -e 's/^\(.*\):[ ]*current ar archive/\1/p'`; do
+ strip -g $f
+done
diff --git a/configure.ac b/configure.ac
index abfa9d3..a79e08b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,7 +4,7 @@
# $Id$
AC_PREREQ(2.59)
-AC_INIT(rpm-mandriva-setup, 0.0.1, nanardon@mandriva.org)
+AC_INIT(rpm-mandriva-setup, 0.1, nanardon@mandriva.org)
AC_CANONICAL_TARGET
AM_INIT_AUTOMAKE(1.9)
AC_CONFIG_SRCDIR
diff --git a/http.req b/http.req
new file mode 100755
index 0000000..5d04d0c
--- /dev/null
+++ b/http.req
@@ -0,0 +1,165 @@
+#!/usr/bin/perl
+
+# This file can find requirements of html and jhtml files (cgi, gif,
+# java dependencies). It is a bit of a hack but it turns out to work
+# well. We track only dependencies between Relative URLs, absolute
+# URL's are assumed to be extenernal to the RPM system. We do not
+# parse the HTML but look through the set of strings (text surrounded
+# by quotes) for something which looks like a reference. This avoids
+# writing a full HTML parsers and tends to work really well. In this
+# manner we can track dependencies for: href, src, action and other
+# HTML tags which have not been invented yet.
+
+
+# The reference:
+#
+# href="http://www.perl.org/images/arrow.gif"
+#
+# does not create a dependency but the reference
+#
+# href="images/arrow.gif"
+#
+# will create a dependency.
+
+# Additionally this program will find the requirements for sun jhtml
+# (html with embedded java) since jhtml is deprecated so is this part
+# of the code.
+
+# These references create dependencies:
+
+# <form action="signup.jhtml" method="POST">
+#
+# <img src="images/spacer.gif" width=1>
+#
+# <A HREF="signup.jhtml">
+#
+# adWidget.writeAd(out, "login.html", "expired");
+#
+# response.sendRedirect("http://"+request.getServerName()+"/mailcom/login.jhtml");
+
+
+# Notice how we look for strings WITH the proper ending. This is
+# because the java sometimes has really strange double quoting
+# conventions. Look at how splitting out the strings in this
+# fragment would get you the wrong text.
+
+# <img src="`c.getImage("bhunterlogo.gif")`" width=217 >
+
+# Ignore non relative references since these dependencies can not be
+# met. (ie, no package you install will ever provide
+# 'http://www.yahoo.com').
+
+# I use basename since I have seen too many http references which
+# begin with '../' and I can not figure out where the document root
+# is for the webserver this would just kill the dependnecy tracking
+# mechanism.
+
+
+
+use File::Basename;
+
+# this is the pattern of extensions to call requirements
+
+$DEPS_PAT = '\.((cgi)|(ps)|(pdf)|(png)|(jpg)|(gif)|(tiff)|(tif)|(xbm)|(html)|(htm)|(shtml)|(jhtml))'; #'
+
+if ("@ARGV") {
+ foreach (@ARGV) {
+ process_file($_);
+ }
+} else {
+
+ # notice we are passed a list of filenames NOT as common in unix the
+ # contents of the file.
+
+ foreach (<>) {
+ process_file($_);
+ }
+}
+
+
+
+foreach $key (sort keys %seen) {
+ print "$key\n";
+}
+
+
+sub process_file {
+
+ my ($file) = @_;
+ chomp $file;
+
+ open(FILE, "<$file")||
+ die("$0: Could not open file: '$file' : $!\n");
+
+ # we have to suck in the whole file at once because too many people
+ # split lines around <java></java> tags.
+
+ my (@file) = <FILE>;
+
+ $_= "@file";
+
+ # ignore line based comments ( careful although it has two slashes
+ # 'http://www.yahoo.com' is not a comment! )
+
+ s!^\s*//.*$!!mg;
+ s!//\s.*$!!mg;
+ s!\s//.*$!!mg;
+
+ # ignore multi-line comments
+ # (use non greedy operators)
+
+ s!/\*.*?\*/!!g;
+ s/<!--.*?-->//g;
+
+ # Ignore non relative references since these dependencies can not be
+ # met. (ie, no package you install will ever provide
+ # 'http://www.yahoo.com').
+
+ # I use basename since I have seen too many http references which
+ # begin with '../' and I can not figure out where the document root
+ # is for the webserver this would just kill the dependnecy tracking
+ # mechanism.
+
+
+ # Notice how we look for strings WITH the proper ending. This is
+ # because the java sometimes has really strange double quoting
+ # conventions. Look at how splitting out the strings in this
+ # fragment would get you the wrong text.
+
+ # <img src="`c.getImage("bhunterlogo.gif")`" width=217 >
+
+ while ( m{\"([^\"]+$DEPS_PAT)\"}g ) {
+ my $string = $1;
+ chomp $string;
+ if ( $string !~ m!http://! ) {
+ $string = basename($string);
+ $string =~ s!\s+!!g;
+ $seen{"http(${string})"} = 1;
+ }
+ }
+
+ {
+
+ # This section is only for use with (Sun) jhtml dependencies, and
+ # since jhtml is deprecated so is this code.
+
+ # java imports in jhtml (may have stars for leaf class)
+ # these may span several lines
+
+ while ( m!<java type=((import)|(extends))>\s*([^<]+)\s*<!g ) {
+ my $java_list = $4;
+ $java_list =~ s/;/ /g;
+ $java_list =~ s/\n+/ /g;
+ $java_list =~ s/\s+/ /g;
+ foreach $java_class ( split(/\s+/, $java_list) ) {
+ $seen{"java(${java_class})"} = 1;
+ }
+ }
+
+ }
+
+ close(FILE)||
+ die("$0: Could not close file: '$file' : $!\n");
+
+ return ;
+}
diff --git a/macros.in b/macros.in
index 1e1f78f..ad53a0e 100644
--- a/macros.in
+++ b/macros.in
@@ -209,9 +209,14 @@
#
%__os_install_post \
- @RPMVENDORDIR@/brp-compress \\\
- @RPMVENDORDIR@/brp-strip \\\
- @RPMVENDORDIR@/brp-strip-comment-note \\\
+ @RPMVENDORDIR@/brp-compress \
+ @RPMVENDORDIR@/brp-strip \
+ @RPMVENDORDIR@/brp-strip-static-archive \
+ @RPMVENDORDIR@/brp-strip-comment-note \
+%{nil}
+
+%__os_install_post \
+ /usr/share/spec-helper/spec-helper \
%{nil}
%__debug_install_post \
diff --git a/magic.prov b/magic.prov
new file mode 100755
index 0000000..ba3a45c
--- /dev/null
+++ b/magic.prov
@@ -0,0 +1,167 @@
+#!/usr/bin/perl
+
+use File::Basename;
+use Getopt::Long;
+
+# this dependency analysis program is the only one which need to know
+# the RPM buildroot to do its work.
+
+# Figuring out what files are really executables via magic numbers is
+# hard. Not only is every '#!' an executable of some type (with a
+# potentially infinite supply of interpreters) but there are thousands
+# of valid binary magic numbers for old OS's and old CPU types.
+
+# Permissions do not always help discriminate binaries from the rest
+# of the files, on Solaris the shared libraries are marked as
+# 'executable'.
+
+# -rwxr-xr-x 1 bin bin 1013248 Jul 1 1998 /lib/libc.so.1
+
+# I would like to let the 'file' command take care of the magic
+# numbers for us. Alas! under linux file prints different kind of
+# messages for each interpreter, there is no common word 'script' to
+# look for.
+
+# ' perl commands text'
+# ' Bourne shell script text'
+# ' a /usr/bin/wish -f script text'
+
+# WORSE on solaris there are entries which say:
+
+# ' current ar archive, not a dynamic executable or shared object'
+
+# how do I grep for 'executable' when people put a 'not executable' in
+# there? I trim off everything after the first comma (if there is
+# one) and if the result has the string 'executable' in it then it may
+# be one.
+
+
+# so we must also do some magic number processing ourselves, and be
+# satisfied with 'good enough'.
+
+# I look for files which have atleast one of the executable bits set
+# and are either labled 'executable' by the file command (see above
+# restriction) OR have a '#!' as their first two characters.
+
+
+$is_mode_executable=oct(111);
+
+# set a known path
+
+$ENV{'PATH'}= (
+ ':/usr/bin'.
+ ':/bin'.
+ '');
+
+# taint perl requires we clean up these bad environmental variables.
+
+delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
+
+$BUILDROOT = '';
+%option_linkage = (
+ "buildroot" => \$BUILDROOT,
+ );
+
+if( !GetOptions (\%option_linkage, "buildroot=s") ) {
+ die("Illegal options in \@ARGV: '@ARGV'\n");
+
+}
+
+if ($BUILDROOT == '/') {
+ $BUILDROOT = '';
+}
+
+if ("@ARGV") {
+ foreach (@ARGV) {
+ process_file($_);
+ }
+} else {
+
+ # notice we are passed a list of filenames NOT as common in unix the
+ # contents of the file.
+
+ foreach (<>) {
+ process_file($_);
+ }
+}
+
+
+foreach $module (sort keys %provides) {
+ print "executable($module)\n";
+}
+
+exit 0;
+
+
+
+
+sub is_file_script {
+
+ my ($file) = @_;
+ chomp $file;
+
+ my $out = 0;
+ open(FILE, "<$file")||
+ die("$0: Could not open file: '$file' : $!\n");
+
+ my $rc = sysread(FILE,$line,2);
+
+ if ( ($rc > 1) && ($line =~ m/^\#\!/) ) {
+ $out = 1;
+ }
+
+ close(FILE) ||
+ die("$0: Could not close file: '$file' : $!\n");
+
+ return $out;
+}
+
+
+
+sub is_file_binary_executable {
+ my ($file) = @_;
+
+ $file_out=`file $file`;
+ # trim off any extra descriptions.
+ $file_out =~ s/\,.*$//;
+
+ my $out = 0;
+ if ($file_out =~ m/executable/ ) {
+ $out = 1;
+ }
+ return $out;
+}
+
+
+sub process_file {
+ my ($file) = @_;
+ chomp $file;
+
+ my $prov_name = $file;
+ $prov_name =~ s!^$BUILDROOT!!;
+
+ # If its a link find the file it points to. Dead links do not
+ # provide anything.
+
+ while (-l $file) {
+ my $newfile = readlink($file);
+ if ($newfile !~ m!^/!) {
+ $newfile = dirname($file).'/'.$newfile;
+ } else {
+ $newfile = $BUILDROOT.$newfile;
+ }
+ $file = $newfile;
+ }
+
+ (-f $file) || return ;
+ ( (stat($file))[2] & $is_mode_executable ) || return ;
+
+ is_file_script($file) ||
+ is_file_binary_executable($file) ||
+ return ;
+
+ $provides{$prov_name}=1;
+ $provides{basename($prov_name)}=1;
+
+ return ;
+}
diff --git a/magic.req b/magic.req
new file mode 100755
index 0000000..e325328
--- /dev/null
+++ b/magic.req
@@ -0,0 +1,143 @@
+#!/usr/bin/perl
+
+# Given a list of filenames on the command line or on stdin this
+# script returns the interpreter that is required to run the
+# filenames. Usually this is extracted from the #! line of the file
+# but we also handle the various 'exec' tricks that people use to
+# start the interpreter via an intermediate shell.
+
+# Also we want to convert:
+# /usr/local/bin/perl5.00404
+# /usr/local/bin/tclsh8.0
+# into dependencies with RPM version numbers.
+
+
+
+
+
+# These have all been seen on our system or are "recommended" in
+# various man pages.
+
+# Examples:
+
+# #!/bin/sh
+# # the next line restarts using wish \
+# exec wish "$0" "$@"
+
+
+# #!/bin/sh -- # -*- perl -*- -p
+# eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}'
+# if $running_under_some_shell;
+
+
+# #!/bin/sh -- # -*- perl -*- -p
+# eval '(exit $?0)' && eval 'exec /usr/bin/perl -wS $0 ${1+"$@"}'
+
+
+# #!/bin/sh -- # -*- perl -*- -p
+# & eval 'exec /usr/bin/perl -wS $0 $argv:q'
+# if $running_under_some_shell;
+
+
+# #! /usr/bin/env python
+
+
+use File::Basename;
+
+if ("@ARGV") {
+ foreach (@ARGV) {
+ process_file($_);
+ }
+} else {
+
+ # notice we are passed a list of filenames NOT as common in unix the
+ # contents of the file.
+
+ foreach (<>) {
+ process_file($_);
+ }
+}
+
+
+foreach $prog (sort keys %require) {
+
+
+ # ignore variable interpolation and any program whose name is made
+ # up only of non word characters ('<', '&&', etc).
+
+ ( ( $prog != /\$/ ) || ( $prog =~ /^\W+$/ ) ) &&
+ next;
+
+ # filenames of the form './miniperl' will be reported in canonical
+ # manner 'miniperl'
+
+ $prog =~ s!^\./!!;
+
+ if ( $prog !~ /\$/ ) {
+ print "exectuable($prog)\n";
+ }
+
+ $prog=basename($prog);
+
+ if ( $prog !~ /\$/ ) {
+ print "exectuable($prog)\n";
+
+ # get the correct version dependencies for magic numbers like:
+ # /usr/local/bin/perl5.00404
+ # /usr/local/bin/tclsh8.0
+ # these are always PACKAGE versions since typical executables do not
+ # have versions
+
+ my $version = "";
+ if ($module =~ s/([.0-9]+)$//) {
+ $version = "$1";
+ print "$prog>=$version\n";
+ }
+
+ }
+
+}
+
+exit 0;
+
+
+sub process_file {
+
+ my ($file) = @_;
+ chomp $file;
+
+ my ($version, $magic) = ();
+
+ (-f $file) || return ;
+
+ open(FILE, "<$file")||
+ die("$0: Could not open file: '$file' : $!\n");
+
+ my $rc = sysread(FILE,$line,1000);
+
+ $rc =~ s/\#.*\n//g;
+
+ # Ignore all parameter substitution.
+ # I have no hope of parsing something like:
+ # exec ${SHELL:-/bin/sh}
+ $rc =~ s/\$\{.*\}//g;
+ $rc =~ s/echo\s+.*[\n;]//g;
+
+ if ( ($rc > 1) && ($line =~ m/^\#\!\s*/) ) {
+
+ if ($line =~ m/\b(exec|env)\s+([\'\"\`\\]+)?([^ \t\n\r]+)/) {
+ $require{$3} = 1;
+ }
+
+ # strip off extra lines and any arguments
+ if ($line =~ m/^\#\!\s*([^ \t\n\r]+)/) {
+ $require{$1} = 1;
+ }
+
+ }
+
+ close(FILE) ||
+ die("$0: Could not close file: '$file' : $!\n");
+
+ return ;
+}
diff --git a/perl.prov b/perl.prov
new file mode 100755
index 0000000..6b6774a
--- /dev/null
+++ b/perl.prov
@@ -0,0 +1,180 @@
+#!/usr/bin/perl
+
+# RPM (and it's source code) is covered under two separate licenses.
+
+# The entire code base may be distributed under the terms of the GNU
+# General Public License (GPL), which appears immediately below.
+# Alternatively, all of the source code in the lib subdirectory of the
+# RPM source code distribution as well as any code derived from that
+# code may instead be distributed under the GNU Library General Public
+# License (LGPL), at the choice of the distributor. The complete text
+# of the LGPL appears at the bottom of this file.
+
+# This alternative is allowed to enable applications to be linked
+# against the RPM library (commonly called librpm) without forcing
+# such applications to be distributed under the GPL.
+
+# Any questions regarding the licensing of RPM should be addressed to
+# Erik Troan <ewt@redhat.com>.
+
+# a simple script to print the proper name for perl libraries.
+
+# To save development time I do not parse the perl grammmar but
+# instead just lex it looking for what I want. I take special care to
+# ignore comments and pod's.
+
+# it would be much better if perl could tell us the proper name of a
+# given script.
+
+# The filenames to scan are either passed on the command line or if
+# that is empty they are passed via stdin.
+
+# If there are lines in the file which match the pattern
+# (m/^\s*\$VERSION\s*=\s+/)
+# then these are taken to be the version numbers of the modules.
+# Special care is taken with a few known idioms for specifying version
+# numbers of files under rcs/cvs control.
+
+# If there are strings in the file which match the pattern
+# m/^\s*\$RPM_Provides\s*=\s*["'](.*)['"]/i
+# then these are treated as additional names which are provided by the
+# file and are printed as well.
+
+# I plan to rewrite this in C so that perl is not required by RPM at
+# build time.
+
+# by Ken Estes Mail.com kestes@staff.mail.com
+
+if ("@ARGV") {
+ foreach (@ARGV) {
+ process_file($_);
+ }
+} else {
+
+ # notice we are passed a list of filenames NOT as common in unix the
+ # contents of the file.
+
+ foreach (<>) {
+ chomp $_;
+ process_file($_) if -f $_;
+ }
+}
+
+
+foreach $module (sort keys %require) {
+ if (length($require{$module}) == 0) {
+ print "perl($module)\n";
+ } else {
+
+ # I am not using rpm3.0 so I do not want spaces arround my
+ # operators. Also I will need to change the processing of the
+ # $RPM_* variable when I upgrade.
+
+ print "perl($module) = $require{$module}\n";
+ }
+}
+
+exit 0;
+
+
+
+sub process_file {
+
+ my ($file) = @_;
+
+ open(FILE, "<$file") || return;
+
+ my ($package, $version, $incomment, $inover) = ();
+
+ while (<FILE>) {
+
+ # skip the documentation
+
+ # we should not need to have item in this if statement (it
+ # properly belongs in the over/back section) but people do not
+ # read the perldoc.
+
+ if (m/^=(head1|head2|pod|item)/) {
+ $incomment = 1;
+ }
+
+ if (m/^=(cut)/) {
+ $incomment = 0;
+ $inover = 0;
+ }
+
+ if (m/^=(over)/) {
+ $inover = 1;
+ }
+
+ if (m/^=(back)/) {
+ $inover = 0;
+ }
+
+ if ($incomment || $inover) {
+ next;
+ }
+
+ # skip the data section
+ if (m/^__(DATA|END)__$/) {
+ last;
+ }
+
+ # not everyone puts the package name of the file as the first
+ # package name so we report all namespaces as if they were
+ # provided packages (really ugly).
+
+ if (m/^\s*package\s+([_:a-zA-Z0-9]+)\s*;/) {
+ $package=$1;
+ undef $version;
+ $require{$package}=undef;
+ }
+
+ # after we found the package name take the first assignment to
+ # $VERSION as the version number. Exporter requires that the
+ # variable be called VERSION so we are safe.
+
+ # here are examples of VERSION lines from the perl distribution
+
+ #FindBin.pm:$VERSION = $VERSION = sprintf("%d.%02d", q$Revision$ =~ /(\d+)\.(\d+)/);
+ #ExtUtils/Install.pm:$VERSION = substr q$Revision$, 10;
+ #CGI/Apache.pm:$VERSION = (qw$Revision$)[1];
+ #DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning
+
+ if (
+ ($package) &&
+ (m/^\s*\$VERSION\s*=\s+/)
+ ) {
+
+ # first see if the version string contains the string
+ # '$Revision' this often causes bizzare strings and is the most
+ # common method of non static numbering.
+
+ if (m/(\$Revision: (\d+[.0-9]+))/) {
+ $version= $2;
+ } elsif (m/[\'\"]?(\d+[.0-9]+)[\'\"]?/) {
+
+ # look for a static number hard coded in the script
+
+ $version= $1;
+ }
+ $require{$package}=$version;
+ }
+
+ # Each keyword can appear multiple times. Don't
+ # bother with datastructures to store these strings,
+ # if we need to print it print it now.
+
+ if ( m/^\s*\$RPM_Provides\s*=\s*["'](.*)['"]/i) {
+ foreach $_ (split(/\s+/, $1)) {
+ print "$_\n";
+ }
+ }
+
+ }
+
+ close(FILE) ||
+ die("$0: Could not close file: '$file' : $!\n");
+
+ return ;
+}
diff --git a/perl.req b/perl.req
new file mode 100755
index 0000000..400d49e
--- /dev/null
+++ b/perl.req
@@ -0,0 +1,234 @@
+#!/usr/bin/perl
+
+# RPM (and it's source code) is covered under two separate licenses.
+
+# The entire code base may be distributed under the terms of the GNU
+# General Public License (GPL), which appears immediately below.
+# Alternatively, all of the source code in the lib subdirectory of the
+# RPM source code distribution as well as any code derived from that
+# code may instead be distributed under the GNU Library General Public
+# License (LGPL), at the choice of the distributor. The complete text
+# of the LGPL appears at the bottom of this file.
+
+# This alternatively is allowed to enable applications to be linked
+# against the RPM library (commonly called librpm) without forcing
+# such applications to be distributed under the GPL.
+
+# Any questions regarding the licensing of RPM should be addressed to
+# Erik Troan <ewt@redhat.com>.
+
+# a simple makedepends like script for perl.
+
+# To save development time I do not parse the perl grammmar but
+# instead just lex it looking for what I want. I take special care to
+# ignore comments and pod's.
+
+# It would be much better if perl could tell us the dependencies of a
+# given script.
+
+# The filenames to scan are either passed on the command line or if
+# that is empty they are passed via stdin.
+
+# If there are strings in the file which match the pattern
+# m/^\s*\$RPM_Requires\s*=\s*["'](.*)['"]/i
+# then these are treated as additional names which are required by the
+# file and are printed as well.
+
+# I plan to rewrite this in C so that perl is not required by RPM at
+# build time.
+
+# by Ken Estes Mail.com kestes@staff.mail.com
+
+if ("@ARGV") {
+ foreach (@ARGV) {
+ process_file($_);
+ }
+} else {
+
+ # notice we are passed a list of filenames NOT as common in unix the
+ # contents of the file.
+
+ foreach (<>) {
+ chomp $_;
+ process_file($_) if -f $_;
+ }
+}
+
+
+foreach $module (sort keys %require) {
+ if (length($require{$module}) == 0) {
+ print "perl($module)\n";
+ } else {
+
+ # I am not using rpm3.0 so I do not want spaces arround my
+ # operators. Also I will need to change the processing of the
+ # $RPM_* vairable when I upgrage.
+
+ print "perl($module) >= $require{$module}\n";
+ }
+}
+
+exit 0;
+
+
+
+sub process_file {
+
+ my ($file) = @_;
+
+ open(FILE, "<$file") || return;
+
+ while (<FILE>) {
+
+ # skip the "= <<" block
+
+ if ( ( m/^\s*\$(.*)\s*=\s*<<\s*["'](.*)['"]/i) ||
+ ( m/^\s*\$(.*)\s*=\s*<<\s*(.*);/i) ) {
+ $tag = $2;
+ while (<FILE>) {
+ ( $_ =~ /^$tag/) && last;
+ }
+ }
+
+ # skip the documentation
+
+ # we should not need to have item in this if statement (it
+ # properly belongs in the over/back section) but people do not
+ # read the perldoc.
+
+ if ( (m/^=(head1|head2|pod|item)/) .. (m/^=(cut)/) ) {
+ next;
+ }
+
+ if ( (m/^=(over)/) .. (m/^=(back)/) ) {
+ next;
+ }
+
+ # skip the data section
+ if (m/^__(DATA|END)__$/) {
+ last;
+ }
+
+ # Each keyword can appear multiple times. Don't
+ # bother with datastructures to store these strings,
+ # if we need to print it print it now.
+
+ if ( m/^\s*\$RPM_Requires\s*=\s*["'](.*)['"]/i) {
+ foreach $_ (split(/\s+/, $1)) {
+ print "$_\n";
+ }
+ }
+
+ if (
+
+# ouch could be in a eval, perhaps we do not want these since we catch
+# an exception they must not be required
+
+# eval { require Term::ReadLine } or die $@;
+# eval "require Term::Rendezvous;" or die $@;
+# eval { require Carp } if defined $^S; # If error/warning during compilation,
+
+
+ (m/^(\s*) # we hope the inclusion starts the line
+ (require|use)\s+(?!\{) # do not want 'do {' loops
+ # quotes around name are always legal
+ [\'\"]?([^\;\ \'\"\t]*)[\'\"]?[\t\;\ ]
+ # the syntax for 'use' allows version requirements
+ \s*([.0-9]*)
+ /x)
+ ) {
+ my ($whitespace, $statement, $module, $version) = ($1, $2, $3,$4);
+
+ # we only consider require statements that are flush against
+ # the left edge. any other require statements give too many
+ # false positives, as they are usually inside of an if statement
+ # as a fallback module or a rarely used option
+
+ ($whitespace ne "" && $statement eq "require") && next;
+
+ # if there is some interpolation of variables just skip this
+ # dependency, we do not want
+ # do "$ENV{LOGDIR}/$rcfile";
+
+ ($module =~ m/\$/) && next;
+
+ # skip if the phrase was "use of" -- shows up in gimp-perl, et al
+ next if $module eq 'of';
+
+ # if the module ends in a comma we probaly caught some
+ # documentation of the form 'check stuff,\n do stuff, clean
+ # stuff.' there are several of these in the perl distribution
+
+ ($module =~ m/[,>]$/) && next;
+
+ # if the module name starts in a dot it is not a module name.
+ # Is this necessary? Please give me an example if you turn this
+ # back on.
+
+ # ($module =~ m/^\./) && next;
+
+ # if the module ends with .pm strip it to leave only basename.
+ # starts with /, which means its an absolute path to a file
+ if ($module =~ m(^/)) {
+ print "$module\n";
+ next;
+ }
+
+ # sometimes people do use POSIX qw(foo), or use POSIX(qw(foo)) etc
+ # we can strip qw.*$, as well as (.*$:
+ $module =~ s/qw.*$//;
+ $module =~ s/\(.*$//;
+
+ $module =~ s/\.pm$//;
+
+ # some perl programmers write 'require URI/URL;' when
+ # they mean 'require URI::URL;'
+
+ $module =~ s/\//::/;
+
+ # trim off trailing parenthesis if any. Sometimes people pass
+ # the module an empty list.
+
+ $module =~ s/\(\s*\)$//;
+
+ if ( $module =~ m/^[0-9._]+$/ ) {
+ # if module is a number then both require and use interpret that
+ # to mean that a particular version of perl is specified
+
+ if ($module =~ /5.00/) {
+ print "perl >= 0:$module\n";
+ next;
+ }
+ else {
+ print "perl >= 1:$module\n";
+ next;
+ }
+
+ };
+
+ # ph files do not use the package name inside the file.
+ # perlmodlib documentation says:
+
+ # the .ph files made by h2ph will probably end up as
+ # extension modules made by h2xs.
+
+ # so do not expend much effort on these.
+
+
+ # there is no easy way to find out if a file named systeminfo.ph
+ # will be included with the name sys/systeminfo.ph so only use the
+ # basename of *.ph files
+
+ ($module =~ m/\.ph$/) && next;
+
+ $require{$module}=$version;
+ $line{$module}=$_;
+ }
+
+ }
+
+ close(FILE) ||
+ die("$0: Could not close file: '$file' : $!\n");
+
+ return ;
+}
diff --git a/rpm-mandriva-setup.spec b/rpm-mandriva-setup.spec
index 1f13b66..647b8eb 100644
--- a/rpm-mandriva-setup.spec
+++ b/rpm-mandriva-setup.spec
@@ -1,5 +1,5 @@
%define name rpm-mandriva-setup
-%define version 0.0.1
+%define version 0.1
%define release %mkrel 1
Summary: The Mandriva rpm configuration and scripts
diff --git a/rpmrc.in b/rpmrc.in
index 8e651d1..7d37ca2 100644
--- a/rpmrc.in
+++ b/rpmrc.in
@@ -3,7 +3,6 @@
# @RPMVENDORDIR@/rpmrc
# Getting default rpm configuration
-include: @RPMLIBDIR@/rpmrc
#############################################################
# Values for RPM_OPT_FLAGS for various platforms