3 ### Build script for rsync-backup
5 ### (c) 2012 Mark Wooding
8 ###----- Licensing notice ---------------------------------------------------
10 ### This file is part of the `rsync-backup' program.
12 ### rsync-backup is free software; you can redistribute it and/or modify
13 ### it under the terms of the GNU General Public License as published by
14 ### the Free Software Foundation; either version 2 of the License, or
15 ### (at your option) any later version.
17 ### rsync-backup is distributed in the hope that it will be useful,
18 ### but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 ### GNU General Public License for more details.
22 ### You should have received a copy of the GNU General Public License
23 ### along with rsync-backup; if not, write to the Free Software Foundation,
24 ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39 AM_CFLAGS = $(mLib_CFLAGS)
41 ###--------------------------------------------------------------------------
42 ### Substitution of configuration data.
44 confsubst = $(top_srcdir)/config/confsubst
45 EXTRA_DIST += config/confsubst
48 PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" \
49 BASH="$(BASH)" PYTHON="$(PYTHON)" \
50 sysconfdir="$(sysconfdir)" \
51 mntbkpdir="$(mntbkpdir)" \
52 fshashdir="$(fshashdir)" \
53 pkglocalstatedir="$(localstatedir)/lib/bkp" \
54 pkgdatadir="$(pkgdatadir)" \
57 V_SUBST = $(V_SUBST_$V)
58 V_SUBST_= $(V_SUBST_$(AM_DEFAULT_VERBOSITY))
59 V_SUBST_0 = @printf " SUBST %s\n" $@;
61 SUBST = $(V_SUBST)$(confsubst)
63 ###--------------------------------------------------------------------------
64 ### Programs and scripts.
66 EXTRA_PROGRAMS += rfreezefs
67 rfreezefs_SOURCES = rfreezefs.c
68 rfreezefs_LDADD = $(mLib_LIBS)
69 EXTRA_DIST += rfreezefs.8
71 sbin_PROGRAMS += rfreezefs
72 man_MANS += rfreezefs.8
75 EXTRA_PROGRAMS += dedup-format dedup-sift
76 dedup_format_SOURCES = dedup-format.c
77 dedup_format_LDADD = $(mLib_LIBS)
78 dedup_sift_SOURCES = dedup-sift.c
79 dedup_sift_LDADD = $(mLib_LIBS)
80 ##EXTRA_DIST += dedup-format.8 dedup-sift.8
82 sbin_PROGRAMS += dedup-format dedup-sift
83 ##man_MANS += dedup-format.8 dedup-sift.8
86 pkgdata_DATA += lib.sh
88 EXTRA_DIST += lib.sh.in
89 lib.sh: lib.sh.in Makefile
90 $(SUBST) >lib.sh.new $(srcdir)/lib.sh.in $(SUBSTVARS) && \
93 sbin_SCRIPTS += rsync-backup
94 dist_man_MANS += rsync-backup.8
95 CLEANFILES += rsync-backup
96 EXTRA_DIST += rsync-backup.in
97 rsync-backup: rsync-backup.in Makefile
98 $(SUBST) >rsync-backup.new \
99 $(srcdir)/rsync-backup.in $(SUBSTVARS) && \
100 chmod +x rsync-backup.new && \
101 mv rsync-backup.new rsync-backup
103 sbin_SCRIPTS += update-bkp-index
104 dist_man_MANS += update-bkp-index.8
105 CLEANFILES += update-bkp-index
106 EXTRA_DIST += update-bkp-index.in
107 update-bkp-index: update-bkp-index.in Makefile
108 $(SUBST) >update-bkp-index.new \
109 $(srcdir)/update-bkp-index.in $(SUBSTVARS) && \
110 chmod +x update-bkp-index.new && \
111 mv update-bkp-index.new update-bkp-index
113 sbin_SCRIPTS += check-bkp-status
114 dist_man_MANS += check-bkp-status.8
115 CLEANFILES += check-bkp-status
116 EXTRA_DIST += check-bkp-status.in
117 check-bkp-status: check-bkp-status.in Makefile
118 $(SUBST) >check-bkp-status.new \
119 $(srcdir)/check-bkp-status.in $(SUBSTVARS) && \
120 chmod +x check-bkp-status.new && \
121 mv check-bkp-status.new check-bkp-status
123 bin_SCRIPTS += fshash
124 dist_man_MANS += fshash.1
126 EXTRA_DIST += fshash.in
127 fshash: fshash.in Makefile
128 $(SUBST) >fshash.new \
129 $(srcdir)/fshash.in $(SUBSTVARS) && \
130 chmod +x fshash.new && \
133 ###--------------------------------------------------------------------------
134 ### Contributed scripts.
136 ## Some simple scripts showing how one might create and manage backup
137 ## volumes. Assume the distorted.org.uk key management machinery.
138 dist_noinst_SCRIPTS += create-backup-volume
139 dist_noinst_SCRIPTS += mount-backup-volume
140 dist_noinst_SCRIPTS += umount-backup-volume
142 ###--------------------------------------------------------------------------
143 ### Release machinery.
145 EXTRA_DIST += config/auto-version
148 echo $(VERSION) >$(distdir)/RELEASE
150 ###--------------------------------------------------------------------------
151 ### Debian packaging.
153 EXTRA_DIST += debian/copyright debian/changelog
154 EXTRA_DIST += debian/control debian/rules
155 EXTRA_DIST += debian/compat
158 EXTRA_DIST += debian/fshash.install
161 EXTRA_DIST += debian/rfreezefs.install
164 EXTRA_DIST += debian/rsync-backup.install
165 EXTRA_DIST += debian/rsync-backup.examples
167 ###----- That's all, folks --------------------------------------------------