From 94d6c2b54579205897caa95d6a017f7ed41dc5a0 Mon Sep 17 00:00:00 2001 From: deon Date: Fri, 19 Oct 2018 11:21:26 +0000 Subject: [PATCH] Initial DEB build --- .gitlab-ci.yml | 29 +++++++++++++++++--- debian/changelog | 5 ++++ debian/compat | 1 + debian/control | 17 ++++++++++++ debian/copyright | 0 debian/debhelper-build-stamp | 1 + debian/files | 3 +++ debian/magicka.substvars | 3 +++ debian/patches/makefile.patch | 8 ++++++ debian/patches/series | 1 + debian/rules | 50 +++++++++++++++++++++++++++++++++++ debian/source/format | 1 + 12 files changed, 115 insertions(+), 4 deletions(-) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/debhelper-build-stamp create mode 100644 debian/files create mode 100644 debian/magicka.substvars create mode 100644 debian/patches/makefile.patch create mode 100644 debian/patches/series create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7582e2a..59fb035 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,29 @@ -image: gcc +image: ci-apt:latest + +stages: +- build + +variables: +- VERSION: 0.12 before_script: - - apt-get update -qq && apt-get install -y -qq build-essential libsqlite3-dev libreadline-dev git libssh-dev libssl1.0-dev libncurses5-dev libmicrohttpd-dev libdbd-sqlite3-perl sed +- apt-get update +- apt-get install -y zip unzip dos2unix libbz2-dev zlib1g-dev libgeoip-dev libncurses5-dev libhunspell-dev libsqlite3-dev libreadline-dev libssl1.0-dev libssh-dev libmicrohttpd-dev libdbd-sqlite3-perl libmosquitto-dev m4 sed -magicka: +build: + stage: build script: - - make www \ No newline at end of file + - set + - env + - pwd + - git archive --output=tar |gzip -9 > ../magicka_${VERSION}.orig.tar.gz + - dpkg-buildpackage -us -uc + tags: + - apt + only: + - debian + +# The files which are to be made available in GitLab +artifacts: + paths: + - build/deb/* diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..ad15779 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +magicka (0.12-1) UNRELEASED; urgency=low + + * Initial release. + + -- Deon George Thu, 18 Oct 2018 22:30:20 +1100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..feef268 --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: magicka +Maintainer: Deon George +Build-Depends: debhelper (>= 8.0.0) +Standards-Version: 3.9.8 +Section: bbs + +Package: magicka +Priority: optional +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: This is the Magicka BBS + Magicka BBS is a bulletin board system (BBS) for UN*X like systems. It is known + to run on Linux, FreeBSD, NetBSD, OpenBSD, Dragonfly BSD, Openindiana(Illumos) + and macOS. + Magicka is meant to be a modern BBS system, using modern technologies, like + Sqlite3, long filenames etc while still retaining the classic BBS feel. ANSI + & Telnet, and good old ZModem. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..e69de29 diff --git a/debian/debhelper-build-stamp b/debian/debhelper-build-stamp new file mode 100644 index 0000000..c86d4e7 --- /dev/null +++ b/debian/debhelper-build-stamp @@ -0,0 +1 @@ +magicka diff --git a/debian/files b/debian/files new file mode 100644 index 0000000..ed73762 --- /dev/null +++ b/debian/files @@ -0,0 +1,3 @@ +magicka-dbgsym_0.12-1_amd64.deb debug extra +magicka_0.12-1_amd64.buildinfo bbs - +magicka_0.12-1_amd64.deb bbs optional diff --git a/debian/magicka.substvars b/debian/magicka.substvars new file mode 100644 index 0000000..679a30c --- /dev/null +++ b/debian/magicka.substvars @@ -0,0 +1,3 @@ +shlibs:Depends=libc6 (>= 2.14), libmicrohttpd12 (>= 0.9.50), libmosquitto1 (>= 1.0), libsqlite3-0 (>= 3.5.9), libssh-4 (>= 0.6.1), libssl1.0.2 (>= 1.0.2d) +misc:Depends= +misc:Pre-Depends= diff --git a/debian/patches/makefile.patch b/debian/patches/makefile.patch new file mode 100644 index 0000000..8eb98a1 --- /dev/null +++ b/debian/patches/makefile.patch @@ -0,0 +1,8 @@ +--- a/deps/libb64-1.2/Makefile ++++ b/deps/libb64-1.2/Makefile +@@ -1,3 +1,5 @@ ++CFLAGS:= ++ + all: all_src all_base64 + + all_src: diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..82374e5 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +makefile.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..5588ec9 --- /dev/null +++ b/debian/rules @@ -0,0 +1,50 @@ +#!/usr/bin/make -f +%: + dh $@ + +override_dh_auto_clean: + make clean || true + rm -f deps/Xmodem/libzmodem.a + rm -f deps/cdk-5.0-20161210/Makefile + rm -f deps/cdk-5.0-20161210/cdk-config + rm -f deps/cdk-5.0-20161210/cli/Makefile + rm -f deps/cdk-5.0-20161210/config.log + rm -f deps/cdk-5.0-20161210/config.status + rm -f deps/cdk-5.0-20161210/demos/Makefile + rm -f deps/cdk-5.0-20161210/examples/Makefile + rm -f deps/cdk-5.0-20161210/include/cdk_config.h + rm -f deps/cdk-5.0-20161210/include/cdk_version.h + rm -f deps/jsmn/jsmn.o + rm -f deps/jsmn/libjsmn.a + rm -f deps/libb64-1.2/base64/depend + rm -f deps/libb64-1.2/src/depend + rm -f deps/libuuid/Makefile + rm -f deps/libuuid/Makefile.in + rm -f deps/libuuid/aclocal.m4 + rm -f deps/libuuid/config.h + rm -f deps/libuuid/config.log + rm -f deps/libuuid/config.status + rm -f deps/libuuid/configure + rm -f deps/libuuid/libtool + rm -f deps/libuuid/ltmain.sh + rm -f deps/libuuid/stamp-h1 + rm -f deps/libuuid/uuid.pc + git checkout deps/libuuid/config.h.in + +override_dh_auto_configure: + echo "NOOP" + +override_dh_autoreconf: + echo "NOOP" + +override_dh_auto_build: + echo "NOOP" + +override_dh_auto_install: + make -j1 www + mkdir -p $$(pwd)/debian/magicka/usr/bin + mkdir -p $$(pwd)/debian/magicka/usr/share/doc/magicka + mkdir -p $$(pwd)/debian/magicka/opt/magicka + cp -p magicka $$(pwd)/debian/magicka/usr/bin/ + cp -pR docs/* $$(pwd)/debian/magicka/usr/share/doc/magicka/ + cp -pR setup.sh $$(pwd)/debian/magicka/opt/magicka/ diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)