aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..40d7d9f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,23 @@
+NAME = weblogin
+SRC = src/login.html src/login.py LICENSE README
+VER = 1.0
+REL = 0
+
+dist: $(NAME).tar.gz $(NAME).spec
+ mkdir -pv ~/rpmbuild/SOURCES
+ cp $(NAME).tar.gz ~/rpmbuild/SOURCES
+ rpmbuild $(NAME).spec -ba
+ cp ~/rpmbuild/RPMS/noarch/$(NAME)-$(VER)-$(REL).noarch.rpm .
+ touch dist
+
+clean:
+ rm -f $(NAME).tar.gz $(NAME)-$(VER)-$(REL).noarch.rpm dist $(NAME).spec
+
+$(NAME).tar.gz: $(SRC)
+ mkdir $(NAME)-$(VER)
+ cp -r -t $(NAME)-$(VER) $(SRC)
+ tar -czf $(NAME).tar.gz $(NAME)-$(VER)
+ rm -rf $(NAME)-$(VER)
+
+$(NAME).spec: $(NAME).spec.in
+ sed -e 's/VERSION/$(VER)/' -e 's/RELEASE/$(REL)/' $< > $@