Skip to content

Commit

Permalink
Change Debian packaging to non-native.
Browse files Browse the repository at this point in the history
- Add additional Makefile targets for generating an upstream tarball
  and to run debuild.
- Replace copyright symlink with a full copy of LICENSE
  • Loading branch information
cblichmann committed May 9, 2017
1 parent c2f89fa commit ce46b0a
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 2 deletions.
27 changes: 27 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
# Source Configuration
go_package = blichmann.eu/code/jailtime
go_programs = jailtime
source_only_tgz = ../jailtime_0.3.orig.tar.xz

# Directories
this_dir := $(patsubst %/,%,$(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
Expand Down Expand Up @@ -58,3 +59,29 @@ $(binaries): $(sources)
@mkdir -p "$(dir $(pkg_src))"
@ln -sf "$(this_dir)" "$(pkg_src)"
@go install $(go_package)

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

# 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: clean
@echo " [Deb-Clean] Removing artifacts"
@debuild -- clean
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 jailtime. To make this a
regular, non-native package, this sub-directory should not be included in the
original source. Use `make dist` 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.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
jailtime (0.3-1) unstable; urgency=medium

* Non-native packaging

-- Christian Blichmann (Secure Email 2017/2018) <mail@blichmann.eu> Tue, 09 May 2017 14:30:57 +0200

jailtime (0.3) unstable; urgency=medium

* Update to newer Golang version
Expand Down
2 changes: 1 addition & 1 deletion debian/compat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7
9
1 change: 0 additions & 1 deletion debian/copyright

This file was deleted.

24 changes: 24 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
jailtime version 0.3
Copyright (c)2015-2017 Christian Blichmann

Create and manage chroot/jail environments

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.
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

0 comments on commit ce46b0a

Please sign in to comment.