Skip to content
This repository has been archived by the owner on Jun 29, 2024. It is now read-only.

Commit

Permalink
Use dh_make debuild
Browse files Browse the repository at this point in the history
  • Loading branch information
rgr4y committed Mar 25, 2021
1 parent ada8a7d commit 4e4314b
Show file tree
Hide file tree
Showing 27 changed files with 188 additions and 45 deletions.
21 changes: 0 additions & 21 deletions Makefile

This file was deleted.

Binary file removed deb/asl-update-node-list_2.0.0-beta.5_all.deb
Binary file not shown.
13 changes: 0 additions & 13 deletions deb/asl-update-node-list_2.0.0-beta.5_all/DEBIAN/postinst

This file was deleted.

4 changes: 0 additions & 4 deletions deb/asl-update-node-list_2.0.0-beta.5_all/DEBIAN/prerm

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
./update-node-list.sh
./update-node-list-connpgm.sh
Empty file.
30 changes: 30 additions & 0 deletions debian/.debhelper/generated/asl-update-node-list/postinst.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Automatically added by dh_installsystemd/12.1.1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
# This will only remove masks created by d-s-h on package removal.
deb-systemd-helper unmask 'asl-update-node-list.service' >/dev/null || true

# was-enabled defaults to true, so new installations run enable.
if deb-systemd-helper --quiet was-enabled 'asl-update-node-list.service'; then
# Enables the unit on first installation, creates new
# symlinks on upgrades if the unit file has changed.
deb-systemd-helper enable 'asl-update-node-list.service' >/dev/null || true
else
# Update the statefile to add new symlinks (if any), which need to be
# cleaned up on purge. Also remove old symlinks.
deb-systemd-helper update-state 'asl-update-node-list.service' >/dev/null || true
fi
fi
# End automatically added section
# Automatically added by dh_installsystemd/12.1.1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
if [ -n "$2" ]; then
_dh_action=restart
else
_dh_action=start
fi
deb-systemd-invoke $_dh_action 'asl-update-node-list.service' >/dev/null || true
fi
fi
# End automatically added section
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Automatically added by dh_installsystemd/12.1.1
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
deb-systemd-invoke stop 'asl-update-node-list.service' >/dev/null || true
fi
# End automatically added section
1 change: 1 addition & 0 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
asl-update-node-list/
6 changes: 6 additions & 0 deletions debian/README.Debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
asl-update-node-list for Debian
------------------------------

<possible notes regarding this package - if none, delete this file>

-- Rob Vella <[email protected]> Thu, 25 Mar 2021 09:40:04 -0700
10 changes: 10 additions & 0 deletions debian/README.source
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
asl-update-node-list for Debian
------------------------------

<this file describes information about the source package, see Debian policy
manual section 4.14. You WILL either need to modify or delete this file>



-- Rob Vella <[email protected]> Thu, 25 Mar 2021 09:40:04 -0700

2 changes: 2 additions & 0 deletions debian/asl-update-node-list-docs.docs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
README.source
README.Debian
14 changes: 14 additions & 0 deletions debian/asl-update-node-list.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh -e

if [ "$1" = "configure" ]; then
if systemctl is-active --quiet updatenodelist; then
echo "Disabling old service..."
set +e
systemctl disable updatenodelist
systemctl stop updatenodelist
fi
fi

#DEBHELPER#

exit 0
19 changes: 19 additions & 0 deletions debian/asl-update-node-list.postrm.debhelper
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Automatically added by dh_installsystemd/12.1.1
if [ -d /run/systemd/system ]; then
systemctl --system daemon-reload >/dev/null || true
fi
# End automatically added section
# Automatically added by dh_installsystemd/12.1.1
if [ "$1" = "remove" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper mask 'asl-update-node-list.service' >/dev/null || true
fi
fi

if [ "$1" = "purge" ]; then
if [ -x "/usr/bin/deb-systemd-helper" ]; then
deb-systemd-helper purge 'asl-update-node-list.service' >/dev/null || true
deb-systemd-helper unmask 'asl-update-node-list.service' >/dev/null || true
fi
fi
# End automatically added section
14 changes: 14 additions & 0 deletions debian/asl-update-node-list.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[Unit]
Description=AllStar NodeList Diff Updater
Wants=network-online.target
After=network-online.target asterisk.service

[Service]
ExecStart=/usr/sbin/update-node-list.sh
ExecStop=/usr/bin/kill -9 $MAINPID
Restart=always
RestartSec=10

[Install]
WantedBy=multi-user.target
Alias=update-node-list.service
2 changes: 2 additions & 0 deletions debian/asl-update-node-list.substvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
misc:Depends=
misc:Pre-Depends=
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
asl-update-node-list (2.0.0-beta.5-1) unstable; urgency=medium

* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>

-- Rob Vella <[email protected]> Thu, 25 Mar 2021 09:40:04 -0700
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
11
13 changes: 8 additions & 5 deletions ...node-list_2.0.0-beta.5_all/DEBIAN/control → debian/control
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
Package: asl-update-node-list
Version: 2.0.0-beta.5
Source: asl-update-node-list
Section: comm
Priority: optional
Maintainer: Rob Vella <[email protected]>
Build-Depends: debhelper (>= 11)
Standards-Version: 4.1.3
Homepage: http://www.allstarlink.org

Package: asl-update-node-list
Architecture: all
Depends: asl-asterisk
Maintainer: Rob Vella <[email protected]>
Depends: ${misc:Depends}
Description: AllStarLink Differential Node List Updater
Replaces old rc.updatenodelist to provide differential updates
Homepage: http://www.allstarlink.org
38 changes: 38 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: asl-update-node-list
Source: <url://example.com>

Files: *
Copyright: <years> <put author's name and email here>
<years> <likewise for another author>
License: <special license>
<Put the license of the package here indented by 1 space>
<This follows the format of Description: lines in control file>
.
<Including paragraphs>

# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2021 Rob Vella <[email protected]>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".

# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid picking licenses with terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.
1 change: 1 addition & 0 deletions debian/debhelper-build-stamp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
asl-update-node-list
2 changes: 2 additions & 0 deletions debian/files
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
asl-update-node-list_2.0.0-beta.5-1_all.deb comm optional
asl-update-node-list_2.0.0-beta.5-1_amd64.buildinfo comm optional
2 changes: 2 additions & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
update-node-list.sh usr/sbin
update-node-list-connpgm.sh usr/sbin
25 changes: 25 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
#export DH_VERBOSE = 1


# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all

# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed


%:
dh $@


# dh_make generated override targets
# This is example for Cmake (See https://bugs.debian.org/641051 )
#override_dh_auto_configure:
# dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH)

1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit 4e4314b

Please sign in to comment.