Skip to content

Commit

Permalink
Add Debian packaging
Browse files Browse the repository at this point in the history
Also update license and copyright years

Signed-off-by: Christian Blichmann <mail@blichmann.eu>
  • Loading branch information
cblichmann committed Dec 31, 2019
1 parent 6ebf39e commit b73b813
Show file tree
Hide file tree
Showing 19 changed files with 302 additions and 11 deletions.
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
headline.sh version 0.2
Copyright (c)2015-2017 Christian Blichmann
headline.sh version 0.3
Copyright (c)2015-2020 Christian Blichmann

ASCII-art font renderer

Expand Down
84 changes: 84 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#!/usr/bin/env make
#
# headline.sh version 0.3
# Copyright (c)2015-2020 Christian Blichmann
#
# Makefile for POSIX compatible systems
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

# Source Configuration
version = 0.3
c_year ?= $(shell date +%Y)
source_only_tgz = ../headline.sh_$(version).orig.tar.xz

# Directories
this_dir := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
bin_dir := $(this_dir)/bin

.PHONY: all
all:
@echo " [Nop] No need to build ./headline.sh"

$(source_only_tgz):
@echo " [Archive] $@"
@tar -C "$(this_dir)" -caf "$@" \
--transform=s,^,headline-$(version)/, \
--exclude=.git/* --exclude=.git \
--exclude=debian/* --exclude=debian \
"--exclude=$@" \
--exclude-vcs-ignores \
.??* *

.PHONY: updatesourcemeta
updatesourcemeta:
@echo " [Update] Version and copyright"
@for i in \
$(this_dir)/debian/copyright \
$(this_dir)/debian/rules \
$(this_dir)/man/*.[1-9] \
$(this_dir)/*.sf \
$(this_dir)/headline.sh \
$(this_dir)/LICENSE \
$(this_dir)/Makefile \
$(this_dir)/README.md; \
do \
[ -f $$i ] && sed -i \
-e 's/\(headline.sh version\) [0-9]\+\.[0-9]\+/\1 $(version)/' \
-e 's/\(Copyright (c)[0-9]\+\)-[0-9]\+/\1-$(c_year)/' \
$$i; \
done

# Create a source tarball without the debian/ subdirectory
.PHONY: debsource
debsource: $(source_only_tgz)

# debuild signs the package iff DEBFULLNAME, DEBEMAIL and DEB_SIGN_KEYID are
# set. Note that if the GPG key includes an alias, it must match the latest
# entry in debian/changelog.
deb: debsource $(binaries)
@echo " [Debuild] Building package"
@debuild

.PHONY: debclean
debclean:
@echo " [Deb-Clean] Removing artifacts"
@debuild -- clean
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ Bugs
Copyright/License
-----------------

headline.sh version 0.2
Copyright (c)2015-2017 Christian Blichmann <headline-sh@blichmann.eu>
headline.sh version 0.3
Copyright (c)2015-2020 Christian Blichmann <headline-sh@blichmann.eu>

headline.sh is licensed under a two-clause BSD license, see the LICENSE file
for details.
7 changes: 7 additions & 0 deletions debian/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
## Debian packaging

This directory contains the Debian package source for headline.sh. To make
this a regular, non-native package, this sub-directory should not be included
in the original source. Use `make debsource` from the parent directory to
build a source tarball compliant with Debian policy. The contents of this
directory may then serve as a starting point for official packaging.
12 changes: 12 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
headline.sh (0.3-1) UNRELEASED; urgency=medium

* Add Debian packaging
* Update license information and readme

-- Christian Blichmann <mail@blichmann.eu> Tue, 31 Dec 2019 15:21:36 +0100

headline.sh (0.2-1) UNRELEASED; urgency=medium

* Initial release. Tested with Bash 4.4.

-- Christian Blichmann <mail@blichmann.eu> Wed, 15 Feb 2017 12:01:00 +0100
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
16 changes: 16 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Source: headline.sh
Maintainer: Christian Blichmann <headline-sh@blichmann.eu>
Section: admin
Priority: optional
Build-Depends: cdbs,
debhelper (>= 10)
Standards-Version: 4.2.1
Homepage: https://github.com/cblichmann/headline.sh

Package: headline.sh
Architecture: any
Built-Using: ${misc:Built-Using}
Depends: ${misc:Depends}
Description: ASCII-art font renderer for the command-line
headline.sh is a small Bash shell script to print banner text to the
terminal in different fonts.
27 changes: 27 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/

Files: *
Copyright: 2015-2019 Christian Blichmann <mail@blichmann.eu>
License: BSD-2-clause

License: BSD-2-clause
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
.
THIS SOFTWARE IS PROVIDED BY AUTHORS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
6 changes: 6 additions & 0 deletions debian/headline.sh.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
headline.sh /usr/share/headline.sh/
digital.sf /usr/share/headline.sh/
midnight.sf /usr/share/headline.sh/
null.sf /usr/share/headline.sh/
shell-sans.sf /usr/share/headline.sh/
README.md /usr/share/doc/headline.sh/
1 change: 1 addition & 0 deletions debian/headline.sh.links
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/usr/share/headline.sh/headline.sh /usr/bin/headline.sh
28 changes: 28 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/usr/bin/make -f
#
# headline.sh version 0.3
# Copyright (c)2015-2020 Christian Blichmann
#
# CDBS rules file for Debian packaging
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

include /usr/share/cdbs/1/rules/debhelper.mk
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)
2 changes: 2 additions & 0 deletions debian/source/local-options
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
unapply-patches
abort-on-upstream-changes
4 changes: 4 additions & 0 deletions debian/watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version=4
opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%headline.sh-$1.tar.gz%" \
https://github.com/cblichmann/headline.sh/tags \
(?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian update
27 changes: 26 additions & 1 deletion digital.sf
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
# headline.sh version 0.3
# Copyright (c)2015-2020 Christian Blichmann
#
# Simple proportional font inspired by digtal clocks
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# This file must be sourcable.
letter_height=3
data_start=8
data_start=33
characters=' .:ABCDEFGHIJKLMNOPQRSTUVWXYZ'
declare -A kern_map=()
kern_width=1
Expand Down
4 changes: 2 additions & 2 deletions headline.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# headline.sh version 0.2
# Copyright (c)2015-2017 Christian Blichmann
# headline.sh version 0.3
# Copyright (c)2015-2020 Christian Blichmann
#
# ASCII-art font renderer
#
Expand Down
27 changes: 26 additions & 1 deletion midnight.sf
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
# headline.sh version 0.3
# Copyright (c)2015-2020 Christian Blichmann
#
# A font similar to the one used in Midnight Commander
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# This file must be sourcable.
letter_height=6
data_start=8
data_start=33
characters='dghintM'
declare -A kern_map=()
kern_width=1
Expand Down
31 changes: 29 additions & 2 deletions null.sf
Original file line number Diff line number Diff line change
@@ -1,7 +1,32 @@
# headline.sh version 0.3
# Copyright (c)2015-2020 Christian Blichmann
#
# An identity-mapped font
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# This file must be sourcable.
letter_height=1
data_start=8
characters=' -_.!|abcdefghijklmnopqrstuvwxyzäöüCNST'
data_start=33
characters=' -_.!|abcdefghijklmnopqrstuvwxyzäöüABCNST'
declare -A kern_map=()
kern_width=1
return; cat <<EOF
Expand Down Expand Up @@ -40,6 +65,8 @@ z
ä
ö
ü
A
B
C
N
S
Expand Down
27 changes: 26 additions & 1 deletion shell-sans.sf
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
# headline.sh version 0.3
# Copyright (c)2015-2020 Christian Blichmann
#
# Shell Sans, a decorative ASCII-art font
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# This file must be sourcable.
letter_height=5
data_start=14
data_start=39
characters=' !"#$%+,-.12345:;[]_'\
'abcdefghijklmnopqrstuvwxyz|äöüCNST'
#' !"#$%&'\''()*+,-./'
Expand Down

0 comments on commit b73b813

Please sign in to comment.