summaryrefslogtreecommitdiffhomepage
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
parent69ed2cce7793a987581e7643588387cd99cb115a (diff)
Complete build environmentv1.3
-rw-r--r--Makefile35
-rw-r--r--debian/weblog.conf4
-rwxr-xr-xremote-install.sh24
-rw-r--r--webserver.conf.example4
4 files changed, 66 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)
diff --git a/debian/weblog.conf b/debian/weblog.conf
index e109177..6dd9ab7 100644
--- a/debian/weblog.conf
+++ b/debian/weblog.conf
@@ -1,2 +1,6 @@
<config>
+ <port>::1:9019</port>
+ <datapath>/home/ernie/testblog</datapath>
+ <name>Roland Reichweins Blog</name>
+ <keywords>Roland Reichwein, Blog</keywords>
</config>
diff --git a/remote-install.sh b/remote-install.sh
new file mode 100755
index 0000000..6683d2e
--- /dev/null
+++ b/remote-install.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# Script to be run on target server to install *.deb and *.tgz
+#
+
+set -e
+
+if [ "$#" != "2" ] ; then
+ echo "Usage: remote-install.sh <ProjectName> <Version>"
+ exit 0
+fi
+
+PROJECTNAME=$1
+VERSION=$2
+DISTROS="debian11"
+
+cd /var/www/reichwein.it-debian
+
+for i in $DISTROS; do
+ echo "Installing ${PROJECTNAME} for $i ..."
+ reprepro -C $i --ignore=wrongdistribution include stable /home/rr/result/$i/${PROJECTNAME}_${VERSION}_amd64.changes
+ echo "Copying ${PROJECTNAME} for $i to direct download location ..."
+ #cp /home/rr/result/$i/${PROJECTNAME}_${VERSION}_*.deb /var/www/reichwein.it-download/$i/
+done
diff --git a/webserver.conf.example b/webserver.conf.example
new file mode 100644
index 0000000..a29d74e
--- /dev/null
+++ b/webserver.conf.example
@@ -0,0 +1,4 @@
+ <path requested="/blog">
+ <plugin>fcgi</plugin>
+ <target>::1:9091</target>
+ </path>