[server] Preserve any existing config files in /etc/fwknop/
[fwknop.git] / Makefile.am
1 ACLOCAL_AMFLAGS = -I m4
2
3 if WANT_CLIENT
4   CLIENT_DIR = client
5 endif
6
7 if WANT_SERVER
8   SERVER_DIR = server
9 endif
10
11 SUBDIRS = \
12     lib \
13     common \
14     $(CLIENT_DIR) \
15     $(SERVER_DIR) \
16     doc 
17
18 EXTRA_DIST = \
19     android/COPYING \
20     android/Application.mk \
21     android/README \
22     android/project/src/com/max2idea/android/fwknop/R.java \
23     android/project/src/com/max2idea/android/fwknop/Fwknop.java \
24     android/project/build.xml \
25     android/project/default.properties \
26     android/project/res/values/strings.xml \
27     android/project/res/drawable-hdpi/icon.png \
28     android/project/res/drawable-mdpi/icon.png \
29     android/project/res/drawable-ldpi/icon.png \
30     android/project/res/drawable/lock_64x64.png \
31     android/project/res/drawable/lock_32x32.png \
32     android/project/res/drawable/lock_128x128.png \
33     android/project/res/layout/main.xml \
34     android/project/nbproject/project.properties \
35     android/project/nbproject/project.xml \
36     android/project/nbproject/build-impl.xml \
37     android/project/nbproject/private/private.properties \
38     android/project/nbproject/private/private.xml \
39     android/project/nbproject/private/config.properties \
40     android/project/nbproject/genfiles.properties \
41     android/project/build.properties \
42     android/project/AndroidManifest.xml \
43     android/project/jni/fwknop/fwknop_client.c \
44     android/project/jni/fwknop/fwknop_client.h \
45     android/project/jni/fwknop/send_spa_packet.c \
46     android/project/jni/config.h \
47     android/project/jni/libfwknop/README \
48     android/project/jni/libfwknop/get_libfko_files.sh \
49     android/project/jni/logutils.h \
50     android/project/jni/Android.mk \
51     ChangeLog \
52     ChangeLog.git \
53     CREDITS \
54     todo.org \
55     extras/fwknop.init.debian \
56     extras/fwknop.init.openwrt \
57     extras/fwknop.init.redhat \
58     extras/openwrt/README.openwrt \
59     extras/openwrt/package/fwknop/Makefile \
60     extras/openwrt/package/fwknop/files/fwknopd.init \
61     extras/openwrt/package/gpgme/Makefile \
62     extras/fwknop-launcher/fwknop-launcher-lsof.pl \
63     extras/fwknop-launcher/fwknop-launcher.conf \
64     fwknop.spec \
65     iphone/main.m \
66     iphone/Fwknop.xcodeproj \
67     iphone/Fwknop.xcodeproj/project.pbxproj \
68     iphone/Fwknop.xcodeproj/dev.pbxuser \
69     iphone/Fwknop.xcodeproj/dev.mode1v3 \
70     iphone/lock_57x57.png \
71     iphone/Fwknop.pch \
72     iphone/README \
73     iphone/Info.plist \
74     iphone/COPYING \
75     iphone/Classes \
76     iphone/Classes/MyAppDelegate.h \
77     iphone/Classes/fwknop \
78     iphone/Classes/fwknop/send_spa_packet.c \
79     iphone/Classes/fwknop/fwknop_client.c \
80     iphone/Classes/fwknop/fwknop_client.h \
81     iphone/Classes/FwknopController.m \
82     iphone/Classes/config.h \
83     iphone/Classes/FwknopController.h \
84     iphone/Classes/bridge_fwknop.h \
85     iphone/Classes/MyAppDelegate.m \
86     iphone/Classes/libfwknop \
87     iphone/Classes/libfwknop/README \
88     iphone/Classes/libfwknop/config.h \
89     iphone/Classes/libfwknop/fko_common.b \
90     iphone/Classes/libfwknop/get_libfko_files.sh \
91     iphone/Classes/bridge_fwknop.c \
92     iphone/Classes/logutils.h \
93     perl/FKO/README \
94     perl/FKO/inc/Devel/CheckLib.pm \
95     perl/FKO/MANIFEST \
96     perl/FKO/ppport.h \
97     perl/FKO/FKO.xs \
98     perl/FKO/t/03_errors.t \
99     perl/FKO/t/02_functions.t \
100     perl/FKO/t/01_constants.t \
101     perl/FKO/t/00_init.t \
102     perl/FKO/Makefile.PL \
103     perl/FKO/typemap \
104     perl/FKO/lib/FKO.pm \
105     perl/FKO/lib/FKO_Constants.pl \
106     perl/FKO/Changes \
107     python/README \
108     python/setup.py \
109     python/fkomodule.c \
110     python/fko.py \
111     test/conf/client-gpg/pubring.gpg \
112     test/conf/client-gpg/secring.gpg \
113     test/conf/client-gpg/trustdb.gpg \
114     test/conf/client-gpg-no-pw/pubring.gpg \
115     test/conf/client-gpg-no-pw/secring.gpg \
116     test/conf/client-gpg-no-pw/trustdb.gpg \
117     test/conf/server-gpg/pubring.gpg \
118     test/conf/server-gpg/secring.gpg \
119     test/conf/server-gpg/trustdb.gpg \
120     test/conf/server-gpg-no-pw/pubring.gpg \
121     test/conf/server-gpg-no-pw/secring.gpg \
122     test/conf/server-gpg-no-pw/trustdb.gpg \
123     test/conf/default_access.conf \
124     test/conf/default_fwknopd.conf \
125     test/conf/dual_key_usage_access.conf \
126     test/conf/expired_epoch_stanza_access.conf \
127     test/conf/expired_stanza_access.conf \
128     test/conf/force_nat_access.conf \
129     test/conf/future_expired_stanza_access.conf \
130     test/conf/gpg_access.conf \
131     test/conf/gpg_no_pw_access.conf \
132     test/conf/invalid_expire_access.conf \
133     test/conf/ip_source_match_access.conf \
134     test/conf/mismatch_open_ports_access.conf \
135     test/conf/mismatch_user_access.conf \
136     test/conf/multi_gpg_access.conf \
137     test/conf/multi_source_match_access.conf \
138     test/conf/multi_stanzas_access.conf \
139     test/conf/multi_stanzas_with_broken_keys.conf \
140     test/conf/nat_fwknopd.conf \
141     test/conf/no_multi_source_match_access.conf \
142     test/conf/no_source_match_access.conf \
143     test/conf/no_subnet_source_match_access.conf \
144     test/conf/open_ports_access.conf \
145     test/conf/override_fwknopd.conf \
146     test/conf/require_src_access.conf \
147     test/conf/require_user_access.conf \
148     test/conf/subnet_source_match_access.conf \
149     test/conf/local_nat_fwknopd.conf \
150     test/hardening-check \
151     test/local_spa.key \
152     test/test-fwknop.pl \
153     VERSION \
154     win32/config.h \
155     win32/fwknop-client.vcproj \
156     win32/getopt.c \
157     win32/getopt1.c \
158     win32/getopt.h \
159     win32/getlogin.c \
160     win32/getlogin.h \
161     win32/libfko.sln \
162     win32/libfko.vcproj
163
164 # Make dist makes the man pages to put them in the distribution.  We
165 # do not want that. They will be remade after configure and make is
166 # later.  This is bit of a kludge, but seems to work (until I find a
167 # better way).   --DSS
168 #
169 dist-hook:
170         rm -f $(distdir)/client/fwknop.8
171         rm -f $(distdir)/server/fwknopd.8
172
173 uninstall-local:
174         if test -f $(sysconfdir)/fwknop/fwknopd.conf; then \
175                 rm -f $(sysconfdir)/fwknop/fwknopd.conf; \
176         fi
177         if test -f $(sysconfdir)/fwknop/fwknopd.conf.inst; then \
178                 rm -f $(sysconfdir)/fwknop/fwknopd.conf.inst; \
179         fi
180         if test -f $(sysconfdir)/fwknop/access.conf; then \
181                 rm -f $(sysconfdir)/fwknop/access.conf; \
182         fi
183         if test -f $(sysconfdir)/fwknop/access.conf.inst; then \
184                 rm -f $(sysconfdir)/fwknop/access.conf.inst; \
185         fi
186
187 install-exec-hook:
188         if test -d $(sysconfdir)/fwknop; then \
189                 chmod 700 $(sysconfdir)/fwknop; \
190         fi
191         if test -f $(sysconfdir)/fwknop/fwknopd.conf; then :; \
192         else \
193                 if test -f $(sysconfdir)/fwknop/fwknopd.conf.inst; then \
194                         mv $(sysconfdir)/fwknop/fwknopd.conf.inst $(sysconfdir)/fwknop/fwknopd.conf; \
195                 fi \
196         fi
197         if test -f $(sysconfdir)/fwknop/access.conf; then :; \
198         else \
199                 if test -f $(sysconfdir)/fwknop/access.conf.inst; then \
200                         mv $(sysconfdir)/fwknop/access.conf.inst $(sysconfdir)/fwknop/access.conf; \
201                 fi \
202         fi
203         if test -f $(sysconfdir)/fwknop/fwknopd.conf; then \
204                 chmod 600 $(sysconfdir)/fwknop/fwknopd.conf; \
205         fi
206         if test -f $(sysconfdir)/fwknop/access.conf; then \
207                 chmod 600 $(sysconfdir)/fwknop/access.conf; \
208         fi
209