aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am71
1 files changed, 71 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..76a28cc
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,71 @@
+# $Id$
+
+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
+
+pkglibdir = @RPMVENDORDIR@
+
+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'
+
+%: %.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
+ echo $(pkg_data_in)
+
+.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
+
+CLEANFILES = $(pkg_gdata) $(pkg_gscripts) $(macrosfiles) \
+ macros-perarch \
+ make_macrosfiles.sh