debian: create Debian package
This commit is contained in:
@@ -17,3 +17,28 @@ jobs:
|
||||
run: |
|
||||
make
|
||||
sudo make install
|
||||
debian:
|
||||
runs-on: ubuntu-20.04
|
||||
container: debian:buster
|
||||
steps:
|
||||
- name: install tools
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -qq --no-install-recommends devscripts equivs gawk git
|
||||
- uses: actions/checkout@v2
|
||||
- name: install dependencies
|
||||
run: |
|
||||
mk-build-deps -ir -t "apt-get -qq --no-install-recommends"
|
||||
- name: prepare changelog
|
||||
run: |
|
||||
debian/nightly-changelog.sh
|
||||
env:
|
||||
DISTRO: buster
|
||||
- name: build package
|
||||
run: |
|
||||
debuild -us -uc
|
||||
mv ../*.deb ~/
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: deb
|
||||
path: ~/*.deb
|
||||
|
||||
+7
-2
@@ -1,2 +1,7 @@
|
||||
infoconv
|
||||
infoedit
|
||||
/debian/changelog
|
||||
/debian/*debhelper*
|
||||
/debian/files
|
||||
/debian/infoedit
|
||||
/debian/infoedit.substvars
|
||||
/infoconv
|
||||
/infoedit
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
CXX ?= g++
|
||||
PREFIX ?= /usr/local
|
||||
DESTDIR ?=
|
||||
|
||||
all: infoconv infoedit
|
||||
|
||||
infoconv: infoconv.cpp
|
||||
@@ -10,9 +14,10 @@ lint:
|
||||
clang-format-8 -i -style=file *.[hc]pp
|
||||
|
||||
install: infoconv infoedit
|
||||
install infoconv /usr/local/bin/infoconv
|
||||
install infoedit /usr/local/bin/infoedit
|
||||
install -d $(DESTDIR)$(PREFIX)/bin
|
||||
install infoconv $(DESTDIR)$(PREFIX)/bin/infoconv
|
||||
install infoedit $(DESTDIR)$(PREFIX)/bin/infoedit
|
||||
|
||||
uninstall:
|
||||
rm /usr/local/bin/infoconv
|
||||
rm /usr/local/bin/infoedit
|
||||
rm $(DESTDIR)$(PREFIX)/bin/infoconv
|
||||
rm $(DESTDIR)$(PREFIX)/bin/infoedit
|
||||
|
||||
Vendored
+1
@@ -0,0 +1 @@
|
||||
10
|
||||
Vendored
+14
@@ -0,0 +1,14 @@
|
||||
Source: infoedit
|
||||
Section: utils
|
||||
Priority: optional
|
||||
Maintainer: Junxiao Shi <deb@mail1.yoursunny.com>
|
||||
Build-Depends: debhelper (>= 10),
|
||||
libboost-dev,
|
||||
libboost-program-options-dev
|
||||
Standards-Version: 4.5.1
|
||||
Homepage: https://github.com/NDN-Routing/infoedit
|
||||
|
||||
Package: infoedit
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}
|
||||
Description: command line tools for Boost INFO format
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"/..
|
||||
|
||||
PKGVER=$(git show -s --format='%ct %H' | gawk '{ printf "0.0.0-%s-%s", strftime("%Y%m%d%H%M%S", $1), substr($2,1,12) }')
|
||||
|
||||
(
|
||||
echo "infoedit ($PKGVER-nightly~$DISTRO) $DISTRO;"
|
||||
echo " * Automated build of version $PKGVER"
|
||||
echo " -- Junxiao Shi <deb@mail1.yoursunny.com> $(date -R)"
|
||||
) > debian/changelog
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/make -f
|
||||
DH_VERBOSE=1
|
||||
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
|
||||
-include /usr/share/dpkg/buildflags.mk
|
||||
|
||||
export PREFIX=/usr
|
||||
|
||||
%:
|
||||
dh $@
|
||||
Reference in New Issue
Block a user