| 1 |
pkgstatedir = @pkgstatedir@ |
| 2 |
pkgconfdir = @pkgconfdir@ |
| 3 |
|
| 4 |
dist_noinst_SCRIPTS = collect util.pl |
| 5 |
dist_pkgdata_DATA = \ |
| 6 |
arch/artifacts \ |
| 7 |
arch/attackmess \ |
| 8 |
arch/formulae \ |
| 9 |
arch/image_info \ |
| 10 |
arch/materials \ |
| 11 |
arch/messages \ |
| 12 |
arch/races \ |
| 13 |
def_help \ |
| 14 |
animations archetypes bmaps.paths crossfire.0 crossfire.1 faces smooth treasures |
| 15 |
|
| 16 |
CONF_FILES = \ |
| 17 |
config/ban_file \ |
| 18 |
config/dm_file \ |
| 19 |
config/exp_table \ |
| 20 |
config/forbid \ |
| 21 |
config/metaserver2 \ |
| 22 |
config/motd \ |
| 23 |
config/news \ |
| 24 |
config/rules \ |
| 25 |
config/settings \ |
| 26 |
config/stat_bonus |
| 27 |
|
| 28 |
VAR_FILES = highscore banish_file bookarch temp.maps clockdata |
| 29 |
EXTRA_DIST = README .collect-stamp $(CONF_FILES) |
| 30 |
|
| 31 |
helpdir=$(pkgdatadir)/help |
| 32 |
dist_help_DATA = help/*.en help/*.fr |
| 33 |
|
| 34 |
wizhelpdir=$(pkgdatadir)/wizhelp |
| 35 |
dist_wizhelp_DATA = wizhelp/*.en wizhelp/*.fr |
| 36 |
|
| 37 |
admdir=$(pkgdatadir)/adm |
| 38 |
dist_adm_SCRIPTS = adm/archsearch.pl adm/collect_images.pl |
| 39 |
|
| 40 |
i18ndir=$(pkgdatadir)/i18n |
| 41 |
dist_i18n_DATA = i18n/messages.en \ |
| 42 |
i18n/messages.fr |
| 43 |
|
| 44 |
MAINTAINERCLEANFILES = archetypes faces .collect-stamp \ |
| 45 |
animations smooth treasures bmaps.paths crossfire.0 crossfire.1 |
| 46 |
|
| 47 |
PERL = @PERL@ |
| 48 |
|
| 49 |
crossfire.0: bmaps.paths |
| 50 |
$(PERL) $(srcdir)/adm/collect_images.pl -src $(srcdir) -png |
| 51 |
|
| 52 |
.collect-stamp: |
| 53 |
touch .collect-stamp |
| 54 |
|
| 55 |
do-collect: |
| 56 |
$(PERL) -I$(srcdir) collect $(builddir)/arch |
| 57 |
$(PERL) $(srcdir)/adm/collect_images.pl -src $(srcdir) -png |
| 58 |
|
| 59 |
archonly: |
| 60 |
$(PERL) -I$(srcdir) collect $(builddir)/arch ARCHONLY |
| 61 |
|
| 62 |
archetypes faces animations bmaps.paths smooth: .collect-stamp |
| 63 |
touch .collect-stamp |
| 64 |
$(MAKE) do-collect |
| 65 |
|
| 66 |
install-data-local: archetypes crossfire.0 faces animations smooth collect util.pl |
| 67 |
@$(NORMAL_INSTALL) |
| 68 |
$(mkinstalldirs) $(DESTDIR)$(pkgconfdir) |
| 69 |
for i in $(CONF_FILES); do \ |
| 70 |
if [ ! -f $(DESTDIR)$(pkgconfdir)/`basename $$i` ]; then \ |
| 71 |
echo "Installing $$i"; \ |
| 72 |
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgconfdir); \ |
| 73 |
fi \ |
| 74 |
done |
| 75 |
|
| 76 |
$(mkinstalldirs) $(DESTDIR)$(pkgstatedir) |
| 77 |
for i in $(VAR_FILES) ; do \ |
| 78 |
touch $(DESTDIR)$(pkgstatedir)/$$i ; \ |
| 79 |
done |
| 80 |
|
| 81 |
@for i in account datafiles players unique-items template-maps maps; do \ |
| 82 |
if [ ! -d $(DESTDIR)$(pkgstatedir)/$$i ]; then \ |
| 83 |
echo "Creating directory $(pkgstatedir)/$$i"; \ |
| 84 |
$(mkinstalldirs) $(DESTDIR)$(pkgstatedir)/$$i; \ |
| 85 |
fi; \ |
| 86 |
done |
| 87 |
|
| 88 |
|
| 89 |
# Uninstall unchanged config/var files so make distcheck is happy |
| 90 |
# but leave changed file, so no configuration/game state is lost |
| 91 |
uninstall-local: |
| 92 |
-for i in $(CONF_FILES); do \ |
| 93 |
if test ! -f $(DESTDIR)$(pkgconfdir)/$$i ; then \ |
| 94 |
continue ; \ |
| 95 |
fi ; \ |
| 96 |
if diff -q $(srcdir)/$$i $(DESTDIR)$(pkgconfdir)/$$i ; then \ |
| 97 |
rm -f $(DESTDIR)$(pkgconfdir)/$$i ; \ |
| 98 |
fi ; \ |
| 99 |
done |
| 100 |
-for i in $(VAR_FILES) ; do \ |
| 101 |
if test ! -f $(DESTDIR)$(pkgstatedir)/$$i ; then \ |
| 102 |
continue ;\ |
| 103 |
fi ; \ |
| 104 |
if test `wc -c $(DESTDIR)$(pkgstatedir)/$$i|$(AWK) '{ print $$1 }'` -eq "0" ; then \ |
| 105 |
rm -f $(DESTDIR)$(pkgstatedir)/$$i ; \ |
| 106 |
fi ; \ |
| 107 |
done |
| 108 |
|
| 109 |
|
| 110 |
# This block makes the archive of the arch directory. |
| 111 |
archive:: |
| 112 |
$(AMTAR) -ch --exclude=dev --exclude=.svn -f ${PACKAGE}-arch-${VERSION}.tar arch |
| 113 |
|
| 114 |
libArch: |
| 115 |
tar cvf A`perl puredate.pl`.tar arch treasures |
| 116 |
gzip A`perl puredate.pl`.tar |