all: test package
-test: $(BUILDDIR)/parts/scanbasic.sh \
- $(SRCDIR)/errlog.sh \
- $(SRCDIR)/addocr.sh
+test: $(BUILDDIR)/parts/scanbasic.sh
./tests/addocr.bats
./tests/scanbasic.bats
build: $(PACKAGEDIR)/$(BINDIR)/scantopdf \
$(PACKAGEDIR)/$(BINDIR)/scantopdfgray \
$(PACKAGEDIR)/$(BINDIR)/scantopdfbw \
- $(PACKAGEDIR)/$(BINDIR)/addocr
+ $(PACKAGEDIR)/$(BINDIR)/addocr \
+ $(PACKAGEDIR)/$(BINDIR)/addkeywords
package: $(BUILDDIR)/$(PACKAGENAME).deb
################################################################################
$(PACKAGEDIR)/$(BINDIR)/scantopdf: \
- $(BUILDDIR)/parts/scanbasic.sh \
- $(SRCDIR)/scantopdf
+ $(BUILDDIR)/parts/scanbasic.sh
mkdir -p $(@D)
./tools/includer $(SRCDIR)/scantopdf \
chmod 755 $(PACKAGEDIR)/$(BINDIR)/scantopdf
$(PACKAGEDIR)/$(BINDIR)/scantopdfgray: \
- $(BUILDDIR)/parts/scanbasic.sh \
- $(SRCDIR)/scantopdfgray
+ $(BUILDDIR)/parts/scanbasic.sh
mkdir -p $(@D)
./tools/includer $(SRCDIR)/scantopdfgray \
chmod 755 $(PACKAGEDIR)/$(BINDIR)/scantopdfgray
$(PACKAGEDIR)/$(BINDIR)/scantopdfbw: \
- $(BUILDDIR)/parts/scanbasic.sh \
- $(SRCDIR)/scantopdfbw
+ $(BUILDDIR)/parts/scanbasic.sh
mkdir -p $(@D)
./tools/includer $(SRCDIR)/scantopdfgray \
> $(PACKAGEDIR)/$(BINDIR)/scantopdfbw
chmod 755 $(PACKAGEDIR)/$(BINDIR)/scantopdfbw
-$(PACKAGEDIR)/$(BINDIR)/addocr: \
- $(SRCDIR)/errlog.sh \
- $(SRCDIR)/addocr.sh
+$(PACKAGEDIR)/$(BINDIR)/addocr:
mkdir -p $(@D)
./tools/includer $(SRCDIR)/addocr \
> $(PACKAGEDIR)/$(BINDIR)/addocr
chmod 755 $(PACKAGEDIR)/$(BINDIR)/addocr
+$(PACKAGEDIR)/$(BINDIR)/addkeywords:
+
+ mkdir -p $(@D)
+ ./tools/includer $(SRCDIR)/keywords \
+ | sed "s/@VERSION@/$(VERSION)/" \
+ > $(PACKAGEDIR)/$(BINDIR)/addkeywords
+ chmod 755 $(PACKAGEDIR)/$(BINDIR)/addkeywords
+
################################################################################
-$(PACKAGEDIR)/$(SHAREDIR)/scantopdf/cutpage.html: \
- $(SRCDIR)/cutpage.html
+$(PACKAGEDIR)/$(SHAREDIR)/scantopdf/cutpage.html:
mkdir -p $(@D)
cp $(SRCDIR)/cutpage.html $(PACKAGEDIR)/$(SHAREDIR)/scantopdf/cutpage.html
################################################################################
-$(PACKAGEDIR)/DEBIAN/control: \
- $(SRCDIR)/control
+$(PACKAGEDIR)/DEBIAN/control:
mkdir -p $(@D)
cat $(SRCDIR)/control \
$(PACKAGEDIR)/$(BINDIR)/scantopdfgray \
$(PACKAGEDIR)/$(BINDIR)/scantopdfbw \
$(PACKAGEDIR)/$(BINDIR)/addocr \
+ $(PACKAGEDIR)/$(BINDIR)/addkeywords \
$(PACKAGEDIR)/$(SHAREDIR)/scantopdf/cutpage.html \
$(PACKAGEDIR)/DEBIAN/control