summaryrefslogtreecommitdiff
path: root/etc/Makefile.am
diff options
context:
space:
mode:
authorBoyuan Yang <byang@debian.org>2023-06-24 16:40:32 -0400
committerBoyuan Yang <byang@debian.org>2023-06-24 16:40:32 -0400
commit1110cfafc6b92837549bcc4f74f670adc46c1241 (patch)
tree7ee15ef253826a26fe6add510f707f0eb675adac /etc/Makefile.am
Import a2ps_4.15.5.orig.tar.gz
[dgit import orig a2ps_4.15.5.orig.tar.gz]
Diffstat (limited to 'etc/Makefile.am')
-rw-r--r--etc/Makefile.am63
1 files changed, 63 insertions, 0 deletions
diff --git a/etc/Makefile.am b/etc/Makefile.am
new file mode 100644
index 0000000..fa53029
--- /dev/null
+++ b/etc/Makefile.am
@@ -0,0 +1,63 @@
+# Process this file with automake to create Makefile.in
+#
+# Copyright 1995-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+
+ogonkifydir=$(datadir)/ogonkify
+libpath = $(pkgdatadir)/sheets:$(pkgdatadir)/ps:$(pkgdatadir)/encoding:$(pkgdatadir)/afm:$(ogonkifydir)/afm:$(pkgdatadir)/ppd:$(pkgdatadir)/fonts:$(ogonkifydir)/fonts:$(pkgdatadir)
+
+pkgdata_DATA = README
+
+dsysconf = $(DESTDIR)$(sysconfdir)
+
+EXTRA_DIST = README.in
+
+all-local: a2ps.cfg
+
+install-data-local: a2ps.cfg
+ $(mkinstalldirs) $(dsysconf)
+ @if test -r $(dsysconf)/$(PACKAGE).cfg; then \
+ if cmp $(dsysconf)/$(PACKAGE).cfg $(top_builddir)/etc/$(PACKAGE).cfg 2> /dev/null ; then \
+ echo "$(dsysconf)/$(PACKAGE).cfg has not changed"; \
+ else \
+ echo; \
+ echo "*******************"; \
+ echo "* Warning: $(dsysconf)/$(PACKAGE).cfg exist."; \
+ echo "* It has been moved as $(dsysconf)/$(PACKAGE).cfg.old"; \
+ echo "*******************"; \
+ echo; \
+ mv $(dsysconf)/$(PACKAGE).cfg $(dsysconf)/$(PACKAGE).cfg.old; \
+ $(INSTALL_DATA) $(top_builddir)/etc/$(PACKAGE).cfg $(dsysconf)/$(PACKAGE).cfg ; \
+ fi \
+ else \
+ $(INSTALL_DATA) $(top_builddir)/etc/$(PACKAGE).cfg $(dsysconf)/$(PACKAGE).cfg; \
+ fi
+ @test -r $(dsysconf)/a2ps-site.cfg || \
+ $(INSTALL_DATA) $(top_builddir)/etc/a2ps-site.cfg $(dsysconf)/a2ps-site.cfg ;
+
+uninstall-local:
+ rm -f $(dsysconf)/$(PACKAGE).cfg $(dsysconf)/$(PACKAGE)-site.cfg
+
+DISTCLEANFILES = a2ps.cfg README
+
+# Building the correct a2ps.cfg
+a2ps.cfg: a2ps_cfg Makefile
+ sed "s!@libpath@!$(libpath)!" a2ps_cfg > a2ps.cfg
+
+# Building a timestamp to know the version.
+README: README.in Makefile
+ sed "s!@date@!`date`!g;s!@version@!$(VERSION)!g" \
+ $(srcdir)/README.in > README