forked from Z-Bolt/OctoScreen
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
makefile: debian packaging based on dh-golang
Signed-off-by: Máximo Cuadros <[email protected]>
- Loading branch information
Showing
13 changed files
with
189 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
build | ||
|
||
debian/changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
Source: octoprint-tft | ||
Section: devel | ||
Priority: optional | ||
Maintainer: Debian Go Packaging Team <[email protected]> | ||
Uploaders: Máximo Cuadros <[email protected]> | ||
Build-Depends: debhelper (>= 9), | ||
dh-golang, | ||
dh-systemd, | ||
libcairo2-dev (>= 1.14.0), | ||
libgtk-3-dev (>= 3.14) | ||
Standards-Version: 4.1.1 | ||
Homepage: https://github.com/mcuadros/OctoPrint-TFT | ||
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-go/packages/octoprint-tft.git | ||
Vcs-Git: https://anonscm.debian.org/git/pkg-go/packages/octoprint-tft.git | ||
XS-Go-Import-Path: github.com/mcuadros/OctoPrint-TFT | ||
Testsuite: autopkgtest-pkg-go | ||
|
||
Package: octoprint-tft | ||
Architecture: any | ||
Built-Using: ${misc:Built-Using} | ||
Depends: ${shlibs:Depends}, | ||
${misc:Depends}, | ||
libcairo2 (>= 1.14.0), | ||
libgtk-3-0 (>= 3.14) | ||
Description: A OctoPrint touch interface for TFT touch modules based on GTK+3 | ||
OctoPrint-TFT OctoPrint-TFT, a touch interface for TFT touch modules | ||
based on GTK+3. | ||
. | ||
Is a X application to be executed directly in the X Server without any | ||
windows manager, as frontend of a OctoPrint (http://octoprint.org) | ||
server in a Raspberry Pi equipped with any TFT Touch module | ||
(https://www.waveshare.com/wiki/3.5inch_RPi_LCD_(A)). | ||
. | ||
Allows you to control your 3D Printer, like you can do with any TFT/LCD | ||
panel (http://reprap.org/wiki/RepRapTouch), but using OctoPrint and a | ||
Raspberry Pi. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: OctoPrint-TFT | ||
Source: https://github.com/mcuadros/OctoPrint-TFT | ||
|
||
Files: * | ||
Copyright: 2017 Máximo Cuadros | ||
License: MIT License | ||
|
||
Files: debian/* | ||
Copyright: 2017 Máximo Cuadros <[email protected]> | ||
License: MIT License | ||
Comment: Debian packaging is licensed under the same terms as upstream | ||
|
||
License: MIT License | ||
MIT License | ||
. | ||
Copyright (c) 2017 Máximo Cuadros | ||
. | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
. | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[DEFAULT] | ||
pristine-tar = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
. /usr/share/debconf/confmodule | ||
|
||
THIS_PACKAGE=octoprint-tft | ||
DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager | ||
|
||
|
||
# debconf is not a registry, so we only fiddle with the default file if it | ||
# does not exist | ||
if [ ! -e $DEFAULT_DISPLAY_MANAGER_FILE ]; then | ||
if db_get shared/default-x-display-manager; then | ||
# workaround debconf passthru bug (#379198) | ||
if [ -z "$RET" ]; then | ||
$RET="$THIS_PACKAGE" | ||
fi | ||
if [ "$THIS_PACKAGE" != "$RET" ]; then | ||
echo "Please be sure to run \"dpkg --configure $RET\"." | ||
fi | ||
if db_get "$RET"/daemon_name; then | ||
echo "$RET" > $DEFAULT_DISPLAY_MANAGER_FILE | ||
fi | ||
fi | ||
fi | ||
|
||
# Registering the init scripts or starting the daemon may cause output to | ||
# stdout, which can confuse debconf. | ||
db_stop | ||
|
||
DEFAULT_SERVICE=/etc/systemd/system/display-manager.service | ||
# set default-display-manager systemd service link according to our config | ||
if [ "$1" = configure ] && [ -d /etc/systemd/system/ ]; then | ||
if [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ]; then | ||
SERVICE=/lib/systemd/system/$(basename $(cat "$DEFAULT_DISPLAY_MANAGER_FILE")).service | ||
if [ -h "$DEFAULT_SERVICE" ] && [ $(readlink "$DEFAULT_SERVICE") = /dev/null ]; then | ||
echo "Display manager service is masked" >&2 | ||
elif [ -e "$SERVICE" ]; then | ||
ln -sf "$SERVICE" "$DEFAULT_SERVICE" | ||
else | ||
echo "WARNING: $SERVICE is the selected default display manager but does not exist" >&2 | ||
rm -f "$DEFAULT_SERVICE" | ||
fi | ||
else | ||
rm -f "$DEFAULT_SERVICE" | ||
fi | ||
fi | ||
|
||
#DEBHELPER# | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[Unit] | ||
Description=OctoPrint-TFT | ||
Conflicts[email protected] | ||
After=systemd-user-sessions.service [email protected] plymouth-quit.service | ||
|
||
[Service] | ||
ExecStart=/usr/bin/OctoPrint-TFT | ||
StandardOutput=journal | ||
Restart=always | ||
RestartSec=1s | ||
TimeoutStopSec=5s | ||
IgnoreSIGPIPE=no | ||
|
||
[Install] | ||
WantedBy=graphical.target | ||
Alias=display-manager.service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/usr/bin/make -f | ||
|
||
export DH_VERBOSE := 1 | ||
export DH_GOPKG := github.com/mcuadros/OctoPrint-TFT | ||
export DH_GOLANG_INSTALL_ALL := 1 | ||
export DH_GOLANG_EXCLUDES := vendor | ||
|
||
%: | ||
dh $@ --buildsystem=golang --with=golang,systemd | ||
|
||
override_dh_auto_build: | ||
env; \ | ||
dh_auto_build -O--buildsystem=golang -O--no-parallel -- --tags $(GO_TAGS) | ||
|
||
override_dh_install: | ||
mkdir -p $(CURDIR)/debian/octoprint-tft/opt/octoprint-tft/ | ||
cp -r styles $(CURDIR)/debian/octoprint-tft/opt/octoprint-tft/ | ||
rm -rf $(CURDIR)/debian/octoprint-tft/usr/share/gocode | ||
dh_install -XLICENSE | ||
|
||
override_dh_auto_test: | ||
echo "skip no tests" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0 (quilt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
version=3 | ||
opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/octoprint-tft-\$1\.tar\.gz/,\ | ||
uversionmangle=s/(\d)[_\.\-\+]?(RC|rc|pre|dev|beta|alpha)[.]?(\d*)$/\$1~\$2\$3/ \ | ||
https://github.com/mcuadros/OctoPrint-TFT/tags .*/v?(\d\S*)\.tar\.gz |
This file was deleted.
Oops, something went wrong.