### -*-makefile-*- ### ### Build script for rsync-backup ### ### (c) 2012 Mark Wooding ### ###----- Licensing notice --------------------------------------------------- ### ### This file is part of the `rsync-backup' program. ### ### rsync-backup is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by ### the Free Software Foundation; either version 2 of the License, or ### (at your option) any later version. ### ### rsync-backup is distributed in the hope that it will be useful, ### but WITHOUT ANY WARRANTY; without even the implied warranty of ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ### GNU General Public License for more details. ### ### You should have received a copy of the GNU General Public License ### along with rsync-backup; if not, write to the Free Software Foundation, ### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. bin_SCRIPTS = sbin_SCRIPTS = sbin_PROGRAMS = pkgdata_DATA = dist_noinst_SCRIPTS = dist_man_MANS = man_MANS = EXTRA_DIST = EXTRA_PROGRAMS = CLEANFILES = DISTCLEANFILES = AM_CFLAGS = $(mLib_CFLAGS) ###-------------------------------------------------------------------------- ### Substitution of configuration data. confsubst = $(top_srcdir)/config/confsubst EXTRA_DIST += config/confsubst SUBSTVARS = \ PACKAGE="$(PACKAGE)" VERSION="$(VERSION)" \ BASH="$(BASH)" PYTHON="$(PYTHON)" \ sysconfdir="$(sysconfdir)" \ mntbkpdir="$(mntbkpdir)" \ fshashdir="$(fshashdir)" \ pkglocalstatedir="$(localstatedir)/lib/bkp" \ pkgdatadir="$(pkgdatadir)" \ logdir="$(logdir)" V_SUBST = $(V_SUBST_$V) V_SUBST_= $(V_SUBST_$(AM_DEFAULT_VERBOSITY)) V_SUBST_0 = @printf " SUBST %s\n" $@; SUBST = $(V_SUBST)$(confsubst) ###-------------------------------------------------------------------------- ### Programs and scripts. EXTRA_PROGRAMS += rfreezefs rfreezefs_SOURCES = rfreezefs.c rfreezefs_LDADD = $(mLib_LIBS) EXTRA_DIST += rfreezefs.8 if HAVE_MLIB sbin_PROGRAMS += rfreezefs man_MANS += rfreezefs.8 endif pkgdata_DATA += lib.sh CLEANFILES += lib.sh EXTRA_DIST += lib.sh.in lib.sh: lib.sh.in Makefile $(SUBST) >lib.sh.new $(srcdir)/lib.sh.in $(SUBSTVARS) && \ mv lib.sh.new lib.sh sbin_SCRIPTS += rsync-backup dist_man_MANS += rsync-backup.8 CLEANFILES += rsync-backup EXTRA_DIST += rsync-backup.in rsync-backup: rsync-backup.in Makefile $(SUBST) >rsync-backup.new \ $(srcdir)/rsync-backup.in $(SUBSTVARS) && \ chmod +x rsync-backup.new && \ mv rsync-backup.new rsync-backup sbin_SCRIPTS += update-bkp-index dist_man_MANS += update-bkp-index.8 CLEANFILES += update-bkp-index EXTRA_DIST += update-bkp-index.in update-bkp-index: update-bkp-index.in Makefile $(SUBST) >update-bkp-index.new \ $(srcdir)/update-bkp-index.in $(SUBSTVARS) && \ chmod +x update-bkp-index.new && \ mv update-bkp-index.new update-bkp-index sbin_SCRIPTS += check-bkp-status dist_man_MANS += check-bkp-status.8 CLEANFILES += check-bkp-status EXTRA_DIST += check-bkp-status.in check-bkp-status: check-bkp-status.in Makefile $(SUBST) >check-bkp-status.new \ $(srcdir)/check-bkp-status.in $(SUBSTVARS) && \ chmod +x check-bkp-status.new && \ mv check-bkp-status.new check-bkp-status bin_SCRIPTS += fshash dist_man_MANS += fshash.1 CLEANFILES += fshash EXTRA_DIST += fshash.in fshash: fshash.in Makefile $(SUBST) >fshash.new \ $(srcdir)/fshash.in $(SUBSTVARS) && \ chmod +x fshash.new && \ mv fshash.new fshash ###-------------------------------------------------------------------------- ### Contributed scripts. ## Some simple scripts showing how one might create and manage backup ## volumes. Assume the distorted.org.uk key management machinery. dist_noinst_SCRIPTS += create-backup-volume dist_noinst_SCRIPTS += mount-backup-volume dist_noinst_SCRIPTS += umount-backup-volume ###-------------------------------------------------------------------------- ### Release machinery. EXTRA_DIST += config/auto-version dist-hook: echo $(VERSION) >$(distdir)/RELEASE ###-------------------------------------------------------------------------- ### Debian packaging. EXTRA_DIST += debian/copyright debian/changelog EXTRA_DIST += debian/control debian/rules EXTRA_DIST += debian/compat ## fshash EXTRA_DIST += debian/fshash.install ## rfreezefs EXTRA_DIST += debian/rfreezefs.install ## rsync-backup EXTRA_DIST += debian/rsync-backup.install EXTRA_DIST += debian/rsync-backup.examples ###----- That's all, folks --------------------------------------------------