aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile81
1 files changed, 77 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 40b6d6e..365c0e9 100644
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,7 @@ RM := rm
ZBARIMG := zbarimg
SED := sed
GREP := grep
+FILE := file
CFLAGS += -O2 -Wall -Werror
CFLAGS += $(shell pkg-config --cflags --libs libpng) \
$(shell pkg-config --cflags --libs zlib) \
@@ -24,11 +25,83 @@ install:
$(INSTALL) -D -m0755 cqrlogo $(DESTDIR)/usr/share/webapps/cqrlogo/cqrlogo
check:
+ $(eval SERVER := www.eworm.de)
$(RM) -f check.png
- SERVER_NAME=www.eworm.de HTTP_REFERER=http://www.eworm.de/ \
- QUERY_STRING='scale=2&border=1' ./cqrlogo | $(SED) '1,2d' > \
- check.png && $(ZBARIMG) --raw -q check.png | $(GREP) -e \
- '^http://www.eworm.de/$$'
+
+ SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \
+ ./cqrlogo | $(SED) '1,2d' > check.png
+ $(FILE) check.png | $(GREP) 'PNG image data'
+ $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$'
+
+ SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \
+ QUERY_STRING='scale=0' \
+ ./cqrlogo | $(SED) '1,2d' > \
+ check.png
+ $(FILE) check.png | $(GREP) 'PNG image data'
+ $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$'
+
+ SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \
+ QUERY_STRING='scale=4' \
+ ./cqrlogo | $(SED) '1,2d' > \
+ check.png
+ $(FILE) check.png | $(GREP) 'PNG image data'
+ $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$'
+
+ SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \
+ QUERY_STRING='scale=10' \
+ ./cqrlogo | $(SED) '1,2d' > \
+ check.png
+ $(FILE) check.png | $(GREP) 'PNG image data'
+ $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$'
+
+ SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \
+ QUERY_STRING='scale=2&border=0' \
+ ./cqrlogo | $(SED) '1,2d' > \
+ check.png
+ $(FILE) check.png | $(GREP) 'PNG image data'
+ $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$'
+
+ SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \
+ QUERY_STRING='scale=2&border=2' \
+ ./cqrlogo | $(SED) '1,2d' > \
+ check.png
+ $(FILE) check.png | $(GREP) 'PNG image data'
+ $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$'
+
+ SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \
+ QUERY_STRING='scale=2&border=10' \
+ ./cqrlogo | $(SED) '1,2d' > \
+ check.png
+ $(FILE) check.png | $(GREP) 'PNG image data'
+ $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$'
+
+ SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \
+ QUERY_STRING='scale=2&border=10&level=0' \
+ ./cqrlogo | $(SED) '1,2d' > \
+ check.png
+ $(FILE) check.png | $(GREP) 'PNG image data'
+ $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$'
+
+ SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \
+ QUERY_STRING='scale=2&border=10&level=2' \
+ ./cqrlogo | $(SED) '1,2d' > \
+ check.png
+ $(FILE) check.png | $(GREP) 'PNG image data'
+ $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$'
+
+ SERVER_NAME=$(SERVER) HTTP_REFERER=http://$(SERVER)/ \
+ QUERY_STRING='scale=2&border=10&level=4' \
+ ./cqrlogo | $(SED) '1,2d' > \
+ check.png
+ $(FILE) check.png | $(GREP) 'PNG image data'
+ $(ZBARIMG) --raw -q check.png | $(GREP) -e '^http://$(SERVER)/$$'
+
+ SERVER_NAME=eworm.net HTTP_REFERER=http://$(SERVER)/ \
+ ./cqrlogo | $(SED) '1,2d' > \
+ check.png
+ $(FILE) check.png | $(GREP) 'PNG image data'
+ $(ZBARIMG) --raw -q check.png | \
+ $(GREP) -e '^This QR Code has been stolen from eworm.net!$$'
clean:
$(RM) -f *.o *~ cqrlogo