summaryrefslogtreecommitdiffhomepage
path: root/Makefile
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2023-02-19 20:38:22 +0100
committerRoland Reichwein <mail@reichwein.it>2023-02-19 20:38:22 +0100
commit54550dde2ca9c31de0650405e880981b48674153 (patch)
tree3cd5b9c9858d01e2ba56e6da29fe4e9c261d81c7 /Makefile
parent69ed2cce7793a987581e7643588387cd99cb115a (diff)
Complete build environmentv1.3
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile35
1 files changed, 34 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5c94148..bf885a6 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,9 @@ include common.mk
PROJECTNAME=weblog
+DISTROS=debian11
+TGZNAME=$(PROJECTNAME)-$(VERSION).tar.xz
+
LDLIBS=\
-lfcgi \
-lreichwein \
@@ -14,7 +17,6 @@ LDLIBS=\
-lboost_filesystem \
-lboost_regex \
-lpthread \
--lssl -lcrypto \
-ldl
SRC=\
@@ -42,6 +44,37 @@ install:
mkdir -p $(DESTDIR)/usr/bin
cp $(PROJECTNAME) $(DESTDIR)/usr/bin/
+deb:
+ dpkg-buildpackage
+
+debs: $(DISTROS)
+
+deb-src: clean
+ dh_clean
+ dh_auto_clean
+ dpkg-source -b -I.git -Iresult .
+
+$(DISTROS): deb-src
+ sudo pbuilder build --basetgz /var/cache/pbuilder/$@.tgz --buildresult result/$@ ../$(PROJECTNAME)_$(VERSION).dsc
+ debsign result/$@/$(PROJECTNAME)_$(VERSION)_amd64.changes
+
+DISTFILES=$(shell git ls-files 2>/dev/null)
+
+dist: clean
+ rm -rf $(PROJECTNAME)-$(VERSION)
+ mkdir $(PROJECTNAME)-$(VERSION)
+ cp --parents -r $(DISTFILES) $(PROJECTNAME)-$(VERSION)
+ tar cfJ ../$(PROJECTNAME)-$(VERSION).tar.xz $(PROJECTNAME)-$(VERSION)
+ rm -rf $(PROJECTNAME)-$(VERSION)
+ ls -l ../$(PROJECTNAME)-$(VERSION).tar.xz
+
+upload: dist
+ scp ../$(TGZNAME) antcom.de:/var/www/reichwein.it-download/
+ scp -r result antcom.de:
+ scp -r remote-install.sh antcom.de:
+ ssh antcom.de ./remote-install.sh $(PROJECTNAME) $(VERSION)
+ ssh antcom.de rm -rf remote-install.sh result
+
# misc ---------------------------------------------------
clean:
-rm -f *.o *.d $(PROJECTNAME)