2007-05-29 16:53:15 -04:00
|
|
|
# enforce that all scripts have a --help and --version option
|
|
|
|
AUTOMAKE_OPTIONS = std-options
|
2014-05-23 02:02:18 -04:00
|
|
|
AM_INSTALLCHECK_STD_OPTIONS_EXEMPT = makepkg-wrapper
|
2007-02-21 23:36:02 -05:00
|
|
|
|
2011-06-23 22:21:51 -04:00
|
|
|
SUBDIRS = po
|
|
|
|
|
2007-02-21 23:36:02 -05:00
|
|
|
bin_SCRIPTS = \
|
2012-06-07 00:23:06 -04:00
|
|
|
$(OURSCRIPTS) \
|
2013-04-30 18:18:17 -04:00
|
|
|
makepkg-template \
|
2013-09-22 06:25:29 -04:00
|
|
|
makepkg-wrapper \
|
2012-06-07 00:23:06 -04:00
|
|
|
repo-remove \
|
|
|
|
repo-elephant
|
2008-06-14 12:29:29 -04:00
|
|
|
|
|
|
|
OURSCRIPTS = \
|
2007-02-21 23:36:02 -05:00
|
|
|
makepkg \
|
2010-12-08 07:16:37 -05:00
|
|
|
pacman-db-upgrade \
|
2010-09-15 23:40:35 -04:00
|
|
|
pacman-key \
|
2007-02-21 23:36:02 -05:00
|
|
|
pacman-optimize \
|
2009-02-25 13:26:31 -05:00
|
|
|
pkgdelta \
|
2008-06-14 12:29:29 -04:00
|
|
|
repo-add
|
2007-02-21 23:36:02 -05:00
|
|
|
|
2007-05-30 11:04:49 -04:00
|
|
|
EXTRA_DIST = \
|
2007-07-06 18:43:24 -04:00
|
|
|
makepkg.sh.in \
|
2013-04-30 18:18:17 -04:00
|
|
|
makepkg-template.pl.in \
|
2013-09-22 06:25:29 -04:00
|
|
|
makepkg-wrapper.sh.in \
|
2010-12-08 07:16:37 -05:00
|
|
|
pacman-db-upgrade.sh.in \
|
2010-09-15 23:40:35 -04:00
|
|
|
pacman-key.sh.in \
|
2007-07-06 18:43:24 -04:00
|
|
|
pacman-optimize.sh.in \
|
2009-02-25 13:26:31 -05:00
|
|
|
pkgdelta.sh.in \
|
2011-06-08 09:36:46 -04:00
|
|
|
repo-add.sh.in \
|
2015-01-26 09:45:47 -05:00
|
|
|
$(LIBRARY) \
|
|
|
|
$(LIBMAKEPKG_DIST)
|
2011-06-08 09:36:46 -04:00
|
|
|
|
|
|
|
LIBRARY = \
|
2011-06-09 06:43:25 -04:00
|
|
|
library/output_format.sh \
|
2012-04-25 22:27:19 -04:00
|
|
|
library/parseopts.sh \
|
2012-05-06 18:27:43 -04:00
|
|
|
library/human_to_size.sh \
|
2013-03-09 20:12:43 -05:00
|
|
|
library/size_to_human.sh \
|
|
|
|
library/term_colors.sh
|
2007-05-30 11:04:49 -04:00
|
|
|
|
2015-01-26 09:45:47 -05:00
|
|
|
libmakepkgdir = $(datarootdir)/makepkg
|
|
|
|
|
|
|
|
LIBMAKEPKGDIRS = \
|
2015-02-01 06:59:02 -05:00
|
|
|
lint_package \
|
2015-05-12 09:27:07 -04:00
|
|
|
lint_pkgbuild \
|
2015-01-26 20:41:06 -05:00
|
|
|
tidy \
|
2015-01-26 09:45:47 -05:00
|
|
|
util
|
|
|
|
|
|
|
|
LIBMAKEPKG = \
|
2015-01-26 19:57:00 -05:00
|
|
|
libmakepkg/util/message.sh \
|
2015-05-12 08:10:24 -04:00
|
|
|
libmakepkg/util/option.sh \
|
2015-05-12 09:08:22 -04:00
|
|
|
libmakepkg/util/pkgbuild.sh \
|
|
|
|
libmakepkg/util/util.sh
|
2007-05-30 11:04:49 -04:00
|
|
|
|
2015-01-26 09:45:47 -05:00
|
|
|
LIBMAKEPKG_IN = \
|
2015-02-01 06:59:02 -05:00
|
|
|
libmakepkg/lint_package.sh \
|
|
|
|
libmakepkg/lint_package/build_references.sh \
|
|
|
|
libmakepkg/lint_package/missing_backup.sh \
|
2015-05-12 09:27:07 -04:00
|
|
|
libmakepkg/lint_pkgbuild.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/arch.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/backup.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/changelog.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/epoch.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/install.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/optdepends.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/options.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/package_function.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/pkgbase.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/pkglist.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/pkgname.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/pkgrel.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/pkgver.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/provides.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/source.sh \
|
|
|
|
libmakepkg/lint_pkgbuild/util.sh \
|
2015-01-26 20:41:06 -05:00
|
|
|
libmakepkg/tidy.sh \
|
|
|
|
libmakepkg/tidy/docs.sh \
|
|
|
|
libmakepkg/tidy/emptydirs.sh \
|
|
|
|
libmakepkg/tidy/libtool.sh \
|
|
|
|
libmakepkg/tidy/optipng.sh \
|
|
|
|
libmakepkg/tidy/purge.sh \
|
|
|
|
libmakepkg/tidy/staticlibs.sh \
|
|
|
|
libmakepkg/tidy/strip.sh \
|
|
|
|
libmakepkg/tidy/upx.sh \
|
|
|
|
libmakepkg/tidy/zipman.sh \
|
2015-01-26 09:45:47 -05:00
|
|
|
libmakepkg/util.sh
|
|
|
|
|
|
|
|
LIBMAKEPKG_DIST = \
|
|
|
|
$(LIBMAKEPKG) \
|
|
|
|
$(addsuffix .in, $(LIBMAKEPKG_IN))
|
|
|
|
|
|
|
|
# Files that should be removed, but which Automake does not know.
|
|
|
|
MOSTLYCLEANFILES = $(bin_SCRIPTS) $(LIBMAKEPKG_IN)
|
2013-09-22 06:25:30 -04:00
|
|
|
|
2013-09-22 06:25:29 -04:00
|
|
|
clean-local:
|
|
|
|
$(AM_V_at)$(RM) -r .lib
|
|
|
|
|
2008-05-31 12:53:51 -04:00
|
|
|
if USE_GIT_VERSION
|
2011-01-22 09:15:16 -05:00
|
|
|
GIT_VERSION := $(shell sh -c 'git describe --abbrev=4 --dirty | sed s/^v//')
|
2008-05-31 12:53:51 -04:00
|
|
|
REAL_PACKAGE_VERSION = $(GIT_VERSION)
|
|
|
|
else
|
|
|
|
REAL_PACKAGE_VERSION = $(PACKAGE_VERSION)
|
|
|
|
endif
|
|
|
|
|
2007-05-30 11:04:49 -04:00
|
|
|
#### Taken from the autoconf scripts Makefile.am ####
|
|
|
|
edit = sed \
|
2014-08-20 16:46:07 -04:00
|
|
|
-e 's|@rootdir[@]|$(ROOTDIR)|g' \
|
2007-05-30 11:04:49 -04:00
|
|
|
-e 's|@localedir[@]|$(localedir)|g' \
|
|
|
|
-e 's|@sysconfdir[@]|$(sysconfdir)|g' \
|
2007-06-04 17:35:31 -04:00
|
|
|
-e 's|@localstatedir[@]|$(localstatedir)|g' \
|
2013-09-22 06:25:30 -04:00
|
|
|
-e 's|@libmakepkgdir[@]|$(libmakepkgdir)|g' \
|
2011-08-15 08:51:58 -04:00
|
|
|
-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
|
2007-05-30 11:04:49 -04:00
|
|
|
-e 's|@prefix[@]|$(prefix)|g' \
|
2011-06-30 11:07:54 -04:00
|
|
|
-e '1s|!/bin/bash|!$(BASH_SHELL)|g' \
|
2008-05-31 12:53:51 -04:00
|
|
|
-e 's|@PACKAGE_VERSION[@]|$(REAL_PACKAGE_VERSION)|g' \
|
2007-06-04 17:28:23 -04:00
|
|
|
-e 's|@PACKAGE_BUGREPORT[@]|$(PACKAGE_BUGREPORT)|g' \
|
2007-06-04 17:49:09 -04:00
|
|
|
-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
|
2008-12-27 01:35:06 -05:00
|
|
|
-e 's|@BUILDSCRIPT[@]|$(BUILDSCRIPT)|g' \
|
2013-04-30 18:18:17 -04:00
|
|
|
-e 's|@TEMPLATE_DIR[@]|$(TEMPLATE_DIR)|g' \
|
2012-09-29 02:17:12 -04:00
|
|
|
-e 's|@DEBUGSUFFIX[@]|$(DEBUGSUFFIX)|g' \
|
2012-05-22 23:18:42 -04:00
|
|
|
-e "s|@INODECMD[@]|$(INODECMD)|g" \
|
2014-08-10 05:39:12 -04:00
|
|
|
-e "s|@OWNERCMD[@]|$(OWNERCMD)|g" \
|
|
|
|
-e "s|@MODECMD[@]|$(MODECMD)|g" \
|
2008-08-20 00:29:56 -04:00
|
|
|
-e 's|@SIZECMD[@]|$(SIZECMD)|g' \
|
2009-04-26 06:58:04 -04:00
|
|
|
-e 's|@SEDINPLACE[@]|$(SEDINPLACE)|g' \
|
2012-12-16 07:32:54 -05:00
|
|
|
-e 's|@DUFLAGS[@]|$(DUFLAGS)|g' \
|
2012-04-07 12:20:08 -04:00
|
|
|
-e 's|@DUPATH[@]|$(DUPATH)|g' \
|
2011-06-08 09:36:46 -04:00
|
|
|
-e 's|@SCRIPTNAME[@]|$@|g' \
|
2011-06-08 03:36:03 -04:00
|
|
|
-e 's|@configure_input[@]|Generated from $@.sh.in; do not edit by hand.|g'
|
2007-05-30 11:04:49 -04:00
|
|
|
|
|
|
|
## All the scripts depend on Makefile so that they are rebuilt when the
|
|
|
|
## prefix etc. changes. Use chmod -w to prevent people from editing the
|
|
|
|
## wrong file by accident.
|
2008-06-14 12:29:29 -04:00
|
|
|
$(OURSCRIPTS): Makefile
|
2011-12-07 13:33:41 -05:00
|
|
|
$(AM_V_at)$(RM) $@
|
|
|
|
$(AM_V_GEN)test -f $(srcdir)/$@.sh.in && m4 -P -I $(srcdir) $(srcdir)/$@.sh.in | $(edit) >$@
|
|
|
|
$(AM_V_at)chmod +x,a-w $@
|
2012-04-17 21:34:30 -04:00
|
|
|
@$(BASH_SHELL) -O extglob -n $@
|
2007-05-30 11:04:49 -04:00
|
|
|
|
2015-01-26 09:45:47 -05:00
|
|
|
$(LIBMAKEPKG_IN): %: %.in Makefile
|
|
|
|
$(AM_V_at)$(RM) $@
|
|
|
|
$(AM_V_at)$(MKDIR_P) $(dir $@)
|
|
|
|
$(AM_V_GEN)test -f $(srcdir)/$@.in && $(edit) $(srcdir)/$@.in >$@
|
|
|
|
$(AM_V_at)chmod a-w $@
|
|
|
|
@$(BASH_SHELL) -O extglob -n $@
|
|
|
|
|
2011-06-09 06:43:25 -04:00
|
|
|
makepkg: \
|
|
|
|
$(srcdir)/makepkg.sh.in \
|
2013-09-22 06:25:29 -04:00
|
|
|
$(srcdir)/makepkg-wrapper.sh.in \
|
2015-01-26 09:45:47 -05:00
|
|
|
$(srcdir)/library/parseopts.sh \
|
|
|
|
$(LIBMAKEPKG_IN)
|
2011-06-09 06:43:25 -04:00
|
|
|
|
2013-04-30 18:18:17 -04:00
|
|
|
makepkg-template: \
|
|
|
|
$(srcdir)/makepkg-template.pl.in \
|
|
|
|
Makefile
|
|
|
|
|
|
|
|
$(AM_V_at)$(RM) -f makepkg-template
|
|
|
|
$(AM_V_GEN)$(edit) $< > $@
|
|
|
|
$(AM_V_at)chmod +x,a-w $@
|
|
|
|
|
2011-06-09 06:43:25 -04:00
|
|
|
pacman-db-upgrade: \
|
|
|
|
$(srcdir)/pacman-db-upgrade.sh.in \
|
|
|
|
$(srcdir)/library/output_format.sh
|
|
|
|
|
|
|
|
pacman-key: \
|
|
|
|
$(srcdir)/pacman-key.sh.in \
|
2011-07-10 02:53:03 -04:00
|
|
|
$(srcdir)/library/output_format.sh \
|
2012-04-08 14:51:28 -04:00
|
|
|
$(srcdir)/library/parseopts.sh
|
2011-06-09 06:43:25 -04:00
|
|
|
|
2011-06-27 14:29:13 -04:00
|
|
|
pacman-optimize: \
|
|
|
|
$(srcdir)/pacman-optimize.sh.in \
|
|
|
|
$(srcdir)/library/output_format.sh
|
2011-06-09 06:43:25 -04:00
|
|
|
|
|
|
|
pkgdelta: \
|
|
|
|
$(srcdir)/pkgdelta.sh.in \
|
2012-04-25 22:00:00 -04:00
|
|
|
$(srcdir)/library/output_format.sh \
|
|
|
|
$(srcdir)/library/parseopts.sh
|
2011-06-09 06:43:25 -04:00
|
|
|
|
|
|
|
repo-add: \
|
|
|
|
$(srcdir)/repo-add.sh.in \
|
|
|
|
$(srcdir)/library/output_format.sh
|
|
|
|
|
2008-06-14 12:29:29 -04:00
|
|
|
repo-remove: $(srcdir)/repo-add.sh.in
|
2012-06-07 00:23:06 -04:00
|
|
|
$(AM_V_at)$(RM) repo-remove
|
|
|
|
$(AM_V_at)$(LN_S) repo-add repo-remove
|
2007-06-04 17:49:09 -04:00
|
|
|
|
2011-06-24 15:19:36 -04:00
|
|
|
repo-elephant: $(srcdir)/repo-add.sh.in
|
2012-06-07 00:23:06 -04:00
|
|
|
$(AM_V_at)$(RM) repo-elephant
|
|
|
|
$(AM_V_at)$(LN_S) repo-add repo-elephant
|
2011-06-24 15:19:36 -04:00
|
|
|
|
2013-09-22 06:25:29 -04:00
|
|
|
makepkg-wrapper: \
|
|
|
|
Makefile \
|
|
|
|
$(srcdir)/makepkg-wrapper.sh.in \
|
|
|
|
$(srcdir)/makepkg.sh.in \
|
|
|
|
$(srcdir)/library/parseopts.sh \
|
|
|
|
| makepkg
|
|
|
|
$(AM_V_at)$(MKDIR_P) .lib
|
|
|
|
$(AM_V_at)mv -f makepkg .lib
|
|
|
|
$(AM_V_at)$(RM) $@
|
|
|
|
$(AM_V_GEN)sed \
|
|
|
|
-e "s|@PWD[@]|$$(pwd)|" \
|
|
|
|
-e '1s|!/bin/bash|!$(BASH_SHELL)|g' \
|
|
|
|
$(srcdir)/$@.sh.in > $@
|
|
|
|
$(AM_V_at)chmod +x,a-w $@
|
|
|
|
$(AM_V_at)$(LN_S) makepkg-wrapper makepkg
|
|
|
|
|
2014-03-03 05:14:45 -05:00
|
|
|
install-exec-hook:
|
2013-09-22 06:25:29 -04:00
|
|
|
cd $(DESTDIR)$(bindir) && \
|
|
|
|
$(RM) makepkg makepkg-wrapper
|
|
|
|
$(INSTALL) .lib/makepkg $(DESTDIR)$(bindir)/makepkg
|
2015-01-26 09:45:47 -05:00
|
|
|
for dir in $(LIBMAKEPKGDIRS); do \
|
|
|
|
$(MKDIR_P) $(DESTDIR)$(libmakepkgdir)/$$dir; \
|
|
|
|
done
|
|
|
|
for lib in $(LIBMAKEPKG); do \
|
|
|
|
$(INSTALL) $(srcdir)/$$lib $(DESTDIR)$(libmakepkgdir)/$${lib#libmakepkg}; \
|
|
|
|
done
|
|
|
|
for lib in $(LIBMAKEPKG_IN); do \
|
|
|
|
$(INSTALL) $$lib $(DESTDIR)$(libmakepkgdir)/$${lib#libmakepkg}; \
|
|
|
|
done
|
2011-08-12 18:45:20 -04:00
|
|
|
cd $(DESTDIR)$(bindir) && \
|
2011-09-13 07:47:11 -04:00
|
|
|
$(RM) repo-elephant && \
|
2011-08-12 18:45:20 -04:00
|
|
|
( $(LN_S) repo-add repo-elephant || \
|
|
|
|
ln repo-add repo-elephant || \
|
|
|
|
cp repo-add repo-elephant )
|
|
|
|
cd $(DESTDIR)$(bindir) && \
|
2011-09-13 07:47:11 -04:00
|
|
|
$(RM) repo-remove && \
|
2011-08-12 18:45:20 -04:00
|
|
|
( $(LN_S) repo-add repo-remove || \
|
|
|
|
ln repo-add repo-remove || \
|
|
|
|
cp repo-add repo-remove )
|
|
|
|
|
|
|
|
uninstall-hook:
|
|
|
|
cd $(DESTDIR)$(bindir) && \
|
|
|
|
$(RM) repo-remove repo-elephant
|
2015-01-26 09:45:47 -05:00
|
|
|
for lib in $(LIBMAKEPKG) $(LIBMAKEPKG_IN); do \
|
|
|
|
$(RM) $(DESTDIR)$(libmakepkgdir)/$${lib#libmakepkg}; \
|
|
|
|
done
|
|
|
|
for dir in $(LIBMAKEPKGDIRS); do \
|
|
|
|
$(RM) -r $(DESTDIR)$(libmakepkgdir)/$$dir; \
|
|
|
|
done
|
2011-08-12 18:45:20 -04:00
|
|
|
|
2014-01-22 18:06:11 -05:00
|
|
|
# vim:set noet:
|