Initial debian build and ci

This commit is contained in:
Deon George 2019-03-17 11:56:48 +00:00
parent c67670029a
commit b9b4475881
11 changed files with 171 additions and 0 deletions

72
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,72 @@
stages:
- build
- deploy
variables:
VERSION: "1.0.7.12"
before_script:
- env|sort
- pwd
build:x86_64:
image: ${CI_REGISTRY}/leenooks/ci-apt:x86_64
stage: build
script:
- groupadd -g 999 bbs && useradd -g bbs -d /opt/mbse -u 1000 mbse
- apt-get update
- apt-get install -y zip unzip dos2unix joe
- git archive --format=tar HEAD |gzip -9 > ../${CI_PROJECT_NAME}_${VERSION}.orig.tar.gz
- dpkg-buildpackage -us -uc
- mkdir build
- ls -al ../
- mv ../${CI_PROJECT_NAME}*.deb build
tags:
- apt
- x86_64
only:
- debian
artifacts:
paths:
- build/*deb
expire_in: 1 week
deploy:x86_64:
stage: deploy
dependencies:
- build:x86_64
script:
- reprepro -b /apt includedeb $(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release) build/${CI_PROJECT_NAME}_${VERSION}*.deb
tags:
- reprepro
build:armv7l:
image: ${CI_REGISTRY}/leenooks/ci-apt:armv7l
stage: build
script:
- groupadd -g 999 bbs && useradd -g bbs -d /opt/mbse -u 1000 mbse
- apt-get update
- apt-get install -y zip unzip dos2unix joe
- git archive --format=tar HEAD |gzip -9 > ../${CI_PROJECT_NAME}_${VERSION}.orig.tar.gz
- dpkg-buildpackage -us -uc
- mkdir build
- ls -al ../
- mv ../${CI_PROJECT_NAME}*.deb build
tags:
- apt
- armv7l
only:
- debian
artifacts:
paths:
- build/*deb
expire_in: 1 week
deploy:armv7l:
stage: deploy
dependencies:
- build:armv7l
script:
- reprepro -b /apt includedeb $(awk -F"[)(]+" '/VERSION=/ {print $2}' /etc/os-release) build/${CI_PROJECT_NAME}_${VERSION}*.deb
tags:
- reprepro

29
debian/changelog vendored Normal file
View File

@ -0,0 +1,29 @@
mbse (1.0.7.12-1) UNRELEASED; urgency=low
* Upstream upgrade.
-- Deon George <deon@leenooks.net> Sun, 17 Mar 2019 22:24:00 +1100
mbse (1.0.7.9-1) UNRELEASED; urgency=low
* Upstream upgrade.
-- Deon George <deon@leenooks.net> Sat, 18 Sep 2018 09:13:20 +0000
mbse (1.0.7.8-2) UNRELEASED; urgency=low
* Patch mbfido/tic.c to handle small tic files
-- Deon George <deon@leenooks.net> Sat, 17 Sep 2018 23:13:20 +0000
mbse (1.0.7.8-1) UNRELEASED; urgency=low
* Upstream upgrade.
-- Deon George <deon@leenooks.net> Sat, 07 Sep 2018 11:27:20 +0000
mbse (1.0.7.6-2) UNRELEASED; urgency=low
* Added patch lib/getheader.c for Type 2+ Packets from a point.
-- Deon George <deon@leenooks.net> Sat, 04 Sep 2018 02:17:20 +0000
mbse (1.0.7.6-1) UNRELEASED; urgency=low
* Initial release.
-- Deon George <deon@leenooks.net> Sat, 01 Sep 2018 23:13:20 +0000

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
10

12
debian/control vendored Normal file
View File

@ -0,0 +1,12 @@
Source: mbse
Maintainer: Deon George <deon@leenooks.net>
Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.9.8
Section: bbs
Priority: optional
Package: mbse
Priority: optional
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: MBSE Bulletin Board

0
debian/copyright vendored Normal file
View File

1
debian/debhelper-build-stamp vendored Normal file
View File

@ -0,0 +1 @@
mbse

2
debian/files vendored Normal file
View File

@ -0,0 +1,2 @@
mbse_1.0.7.12-1_amd64.buildinfo bbs optional
mbse_1.0.7.12-1_amd64.deb bbs optional

3
debian/mbse.substvars vendored Normal file
View File

@ -0,0 +1,3 @@
shlibs:Depends=libbz2-1.0, libc6 (>= 2.14), libgeoip1, zlib1g (>= 1:1.1.4)
misc:Depends=
misc:Pre-Depends=

21
debian/preinst vendored Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
: ${MBSE_ROOT=/opt/mbse}
groupadd -r bbs
useradd -c "MBSE BBS Admin" -d $MBSE_ROOT -g bbs mbse
install -d -m 755 -o mbse -g bbs $MBSE_ROOT/home
useradd -c "MBSE BBS Login" -md $MBSE_ROOT/home/bbs \
-g bbs -s $MBSE_ROOT/bin/mbnewusr bbs
cat >> $MBSE_ROOT/.bash_profile <<EOF
export MBSE_ROOT=$MBSE_ROOT
export PATH=$MBSE_ROOT/bin:$PATH
EOF
# remove password from bbs user
sed -i '/^bbs:/ s/:!:/::/' /etc/shadow
chown mbse:bbs $MBSE_ROOT/.bash_profile
echo "fido 60179/udp # Chatserver">>/etc/services

29
debian/rules vendored Executable file
View File

@ -0,0 +1,29 @@
#!/usr/bin/make -f
%:
dh $@
override_dh_auto_clean:
# Need to run configure here, to get make clean to work
./configure --prefix=/opt/mbse
make clean
rm -f script/installinit.log
override_dh_auto_configure:
# Need to set --prefix for final install
MBSE_ROOT=/opt/mbse ./configure --prefix=/opt/mbse
override_dh_autoreconf:
# Need to stop autoconf from running - it errors?
# And deletes configure
echo "NOOP"
override_dh_auto_build:
# Need to set MBSE_ROOT for build
MBSE_ROOT=/opt/mbse make -j4
override_dh_auto_install:
# Need to install in DESTDIR
DESTDIR=$$(pwd)/debian/mbse/ MBSE_ROOT=/opt/mbse make -j4 install
override_dh_fixperms:
echo "NOOP"

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)