1 |
# |
2 |
# This file is part of Crossfire TRT, the Multiplayer Online Role Playing Game. |
3 |
# |
4 |
# Copyright (©) 2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team |
5 |
# Copyright (©) 2001,2007 Mark Wedel & Crossfire Development Team |
6 |
# Copyright (©) 1992,2007 Frank Tore Johansen |
7 |
# |
8 |
# Crossfire TRT is free software; you can redistribute it and/or modify it |
9 |
# under the terms of the GNU General Public License as published by the Free |
10 |
# Software Foundation; either version 2 of the License, or (at your option) |
11 |
# any later version. |
12 |
# |
13 |
# This program is distributed in the hope that it will be useful, but |
14 |
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
15 |
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
16 |
# for more details. |
17 |
# |
18 |
# You should have received a copy of the GNU General Public License along |
19 |
# with Crossfire TRT; if not, write to the Free Software Foundation, Inc. 51 |
20 |
# Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
21 |
# |
22 |
# The authors can be reached via e-mail to <crossfire@schmorp.de> |
23 |
# |
24 |
|
25 |
pkgstatedir = @pkgstatedir@ |
26 |
pkgconfdir = @pkgconfdir@ |
27 |
|
28 |
nobase_dist_pkgdata_DATA = artifacts def_help formulae races \ |
29 |
attackmess materials cf.pm jeweler.yaml |
30 |
|
31 |
pmdir = $(pkgdatadir)/cf |
32 |
dist_pm_DATA = cf/pod.pm |
33 |
|
34 |
admdir = $(pkgdatadir)/adm |
35 |
dist_adm_DATA = adm/map_info adm/map_expand.pl adm/mapslitter.pl adm/archsearch.pl adm/collect_images.pl |
36 |
|
37 |
CONF_FILES = settings motd dm_file forbid exp_table news rules config |
38 |
VAR_FILES = highscore bookarch temp.maps |
39 |
EXTRA_DIST = README $(CONF_FILES) |
40 |
|
41 |
MAINTAINERCLEANFILES = Makefile.in |
42 |
|
43 |
PERL = @PERL@ |
44 |
|
45 |
install-data-local: jeweler.yaml |
46 |
@$(NORMAL_INSTALL) |
47 |
$(mkinstalldirs) -m 755 $(DESTDIR)$(pkgdatadir)/maps |
48 |
$(mkinstalldirs) -m 755 $(DESTDIR)$(pkgconfdir) |
49 |
for i in $(CONF_FILES); do \ |
50 |
if [ ! -f $(DESTDIR)$(pkgconfdir)/$$i ]; then \ |
51 |
echo "Installing $$i"; \ |
52 |
$(INSTALL_DATA) $(srcdir)/$$i $(DESTDIR)$(pkgconfdir); \ |
53 |
fi \ |
54 |
done |
55 |
$(mkinstalldirs) -m 755 $(DESTDIR)$(pkgstatedir) |
56 |
for i in $(VAR_FILES) ; do \ |
57 |
touch $(DESTDIR)$(pkgstatedir)/$$i ; \ |
58 |
done |
59 |
@for i in datafiles players unique-items template-maps maps random db tmp; do \ |
60 |
if [ ! -d $(DESTDIR)$(pkgstatedir)/$$i ]; then \ |
61 |
echo "Creating directory $(pkgstatedir)/$$i"; \ |
62 |
$(mkinstalldirs) -m 755 $(DESTDIR)$(pkgstatedir)/$$i; \ |
63 |
fi; \ |
64 |
done |
65 |
|
66 |
# Uninstall unchanged config/var files so make distcheck is happy |
67 |
# but leave changed file, so no configuration/game state is lost |
68 |
uninstall-local: |
69 |
-for i in $(CONF_FILES); do \ |
70 |
if test ! -f $(DESTDIR)$(pkgconfdir)/$$i ; then \ |
71 |
continue ; \ |
72 |
fi ; \ |
73 |
if diff -q $(srcdir)/$$i $(DESTDIR)$(pkgconfdir)/$$i ; then \ |
74 |
rm -f $(DESTDIR)$(pkgconfdir)/$$i ; \ |
75 |
fi ; \ |
76 |
done |
77 |
-for i in $(VAR_FILES) ; do \ |
78 |
if test ! -f $(DESTDIR)$(pkgstatedir)/$$i ; then \ |
79 |
continue ;\ |
80 |
fi ; \ |
81 |
if ! [ -s "$(DESTDIR)$(pkgstatedir)/$$i" ] ; then \ |
82 |
rm -f $(DESTDIR)$(pkgstatedir)/$$i ; \ |
83 |
fi ; \ |
84 |
done |
85 |
|
86 |
|