guido+booket@7: # guido+booket@7: # Copyright (C) 2014 Guido Berhoerster guido+booket@7: # guido+booket@7: # Permission is hereby granted, free of charge, to any person obtaining guido+booket@7: # a copy of this software and associated documentation files (the guido+booket@7: # "Software"), to deal in the Software without restriction, including guido+booket@7: # without limitation the rights to use, copy, modify, merge, publish, guido+booket@7: # distribute, sublicense, and/or sell copies of the Software, and to guido+booket@7: # permit persons to whom the Software is furnished to do so, subject to guido+booket@7: # the following conditions: guido+booket@7: # guido+booket@7: # The above copyright notice and this permission notice shall be included guido+booket@7: # in all copies or substantial portions of the Software. guido+booket@7: # guido+booket@7: # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, guido+booket@7: # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF guido+booket@7: # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. guido+booket@7: # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY guido+booket@7: # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, guido+booket@7: # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE guido+booket@7: # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. guido+booket@7: # guido+booket@7: guido+booket@29: PACKAGE = booket guido+booket@29: VERSION = 5 guido+booket@29: DISTNAME := $(PACKAGE)-$(VERSION) guido+booket@17: RSVG_CONVERT := rsvg-convert guido+booket@7: SCOUR := scour guido+booket@7: XMLLINT := xmllint guido+booket@29: PAX := pax guido+booket@29: GZIP := gzip guido+booket@7: guido+booket@17: SVGIMAGES := missing-favicon.svg booket-logo.svg guido+booket@17: PNGIMAGES := booket-favicon.png guido+booket@7: guido+booket@7: .DEFAULT_TARGET = all guido+booket@7: guido+booket@7: .PHONY: all clean clobber guido+booket@7: guido+booket@17: all: $(SVGIMAGES) $(PNGIMAGES) guido+booket@7: guido+booket@7: %.svg: %.src.svg guido+booket@7: $(SCOUR) --quiet -i $< --create-groups --enable-id-stripping \ guido+booket@7: --enable-comment-stripping --remove-metadata \ guido+booket@7: --no-renderer-workaround --strip-xml-prolog --enable-viewboxing \ guido+booket@7: --set-precision=5 | $(XMLLINT) --format --noblanks --output $@ - guido+booket@7: guido+booket@17: %.png: %.src.svg guido+booket@17: $(RSVG_CONVERT) -o $@ $< guido+booket@17: guido+booket@7: clean: guido+booket@17: rm -f $(SVGIMAGES) $(PNGIMAGES) guido+booket@7: guido+booket@7: clobber: clean guido+booket@29: guido+booket@29: dist: all guido+booket@29: $(PAX) -w -x ustar -s ',.*/\..*,,' -s ',./[^/]*\.tar\.gz,,' \ guido+booket@32: -s ',^\.$$,,' -s ',\./,$(DISTNAME)/,' . | \ guido+booket@32: $(GZIP) > $(DISTNAME).tar.gz