contrib: Move scripts content to scripts/Makefile
[oweals/gnunet.git] / contrib / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include
3
4 tap32dir = $(pkgdatadir)/openvpn-tap32/tapw32/
5
6 tap64dir = $(pkgdatadir)/openvpn-tap32/tapw64/
7
8 SUBDIRS = scripts
9
10 dist_pkgdata_DATA = \
11  gns/gns-bcd.html \
12  gns/gns-bcd.tex \
13  gns/def.tex \
14  gns/gns-form-fields.xml \
15  gns/gns-form.xslt \
16  branding/logo/gnunet-logo.pdf \
17  branding/logo/gnunet-logo-color.png \
18  testing_hostkeys.ecc
19
20 if MINGW
21 tap32_DATA = \
22  3rdparty/Windows/openvpn-tap32/tapw32/tap0901.sys \
23  3rdparty/Windows/openvpn-tap32/tapw32/tap0901.cat \
24  3rdparty/Windows/openvpn-tap32/tapw32/OemWin2k.inf
25
26 tap64_DATA = \
27  3rdparty/Windows/openvpn-tap32/tapw64/tap0901.sys \
28  3rdparty/Windows/openvpn-tap32/tapw64/tap0901.cat \
29  3rdparty/Windows/openvpn-tap32/tapw64/OemWin2k.inf
30 endif
31
32 INITD_FILES = \
33  services/openrc/gnunet.initd \
34  services/systemd/gnunet.service
35
36 EXTRA_DIST = \
37  conf/colorit/colorit.conf \
38  conf/editors/eclipse/gnunet_codingstyle.xml \
39  conf/gnunet/no_forcestart.conf \
40  conf/gnunet/no_autostart_above_core.conf \
41  conf/nss/nssswitch.conf \
42  conf/wireshark/wireshark.lua \
43  packages/nix/default.nix \
44  packages/nix/gnunet-dev.nix \
45  3rdparty/Windows/openvpn-tap32/tapw32/tap0901.sys \
46  3rdparty/Windows/openvpn-tap32/tapw32/tap0901.cat \
47  3rdparty/Windows/openvpn-tap32/tapw32/OemWin2k.inf \
48  3rdparty/Windows/openvpn-tap32/tapw64/tap0901.sys \
49  3rdparty/Windows/openvpn-tap32/tapw64/tap0901.cat \
50  3rdparty/Windows/openvpn-tap32/tapw64/OemWin2k.inf \
51  3rdparty/Windows/openvpn-tap32/INSTALL \
52  3rdparty/Windows/openvpn-tap32/tap32-signed-i386-2.1.zip \
53  3rdparty/Windows/openvpn-tap32/tap32-source-2.1.zip \
54  $(INITD_FILES)
55
56 check_PROGRAMS = \
57  test_gnunet_prefix
58
59 if ENABLE_TEST_RUN
60 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
61 TESTS = $(check_PROGRAMS)
62 endif
63
64 test_gnunet_prefix_SOURCES = \
65  test_gnunet_prefix.c
66
67 test_gnunet_prefix_CPPFLAGS = \
68   $(LTDLINCL) $(AM_CPPFLAGS)
69
70 test_gnunet_prefix_LDADD = \
71   $(GCLIBADD) $(WINLIB) \
72   $(LTLIBICONV) \
73   $(GN_LIBINTL) \
74   $(LIBLTDL) -lunistring $(XLIB)
75
76 pkghellodir= $(pkgdatadir)/hellos
77 pkginitddir= $(pkgdatadir)/services
78
79 install-data-local:
80         $(mkinstalldirs) $(DESTDIR)$(pkghellodir)
81         @$(NORMAL_INSTALL)
82         for hello in $(srcdir)/hellos/*; do \
83           if test -f $$hello; then \
84             $(INSTALL_DATA) $$hello $(DESTDIR)$(pkghellodir)/ ; \
85           fi \
86         done
87         install scripts/gnunet-bugreport $(DESTDIR)$(bindir)/gnunet-bugreport
88         mkdir -p $(DESTDIR)$(pkgdatadir)/services/openrc
89         mkdir -p $(DESTDIR)$(pkgdatadir)/services/systemd
90         install services/openrc/gnunet.initd $(DESTDIR)$(pkginitddir)/openrc/
91         install services/systemd/gnunet.service $(DESTDIR)$(pkginitddir)/systemd/
92
93 dist-hook:
94         if test -d $(srcdir)/hellos; then \
95           mkdir -p $(distdir)/hellos; \
96           for hello in $(srcdir)/hellos/*; do \
97             if test -f $$hello; then \
98               cp -p $$hello $(distdir)/hellos; \
99             fi \
100           done \
101         fi