From 0e5d518ac08d18305670931a4a38751983ce718d Mon Sep 17 00:00:00 2001 From: 132ikl <132@ikl.sh> Date: Fri, 10 Apr 2020 04:06:59 -0400 Subject: [PATCH] Move debian package to seperate repo --- package/build.sh | 11 ----------- package/debian/compat | 1 - package/debian/control | 7 ------- package/debian/liteshort.service | 1 - package/debian/rules | 23 ----------------------- setup.py | 2 +- setup/liteshort.ini | 2 +- setup/liteshort.service | 6 +----- 8 files changed, 3 insertions(+), 50 deletions(-) delete mode 100755 package/build.sh delete mode 100644 package/debian/compat delete mode 100644 package/debian/control delete mode 120000 package/debian/liteshort.service delete mode 100755 package/debian/rules diff --git a/package/build.sh b/package/build.sh deleted file mode 100755 index 1d18086..0000000 --- a/package/build.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -e - -VERSION="$(cat liteshort/version.py | cut -d '\"' -f2)" - -cd package/ - -git log --no-walk --tags --pretty="liteshort (%S) unstable; urgency=medium%n%n * See the full changelog at:%n * https://github.com/132ikl/liteshort/releases/tag/v%S%n%n -- Steven Spangler <132@ikl.sh> %cD%n" --decorate=off | sed 's/(v/(/g' | sed 's/\/v/\//g' > debian/changelog - -dpkg-buildpackage -us -uc --build=all - -cd ../ diff --git a/package/debian/compat b/package/debian/compat deleted file mode 100644 index b4de394..0000000 --- a/package/debian/compat +++ /dev/null @@ -1 +0,0 @@ -11 diff --git a/package/debian/control b/package/debian/control deleted file mode 100644 index 1d43344..0000000 --- a/package/debian/control +++ /dev/null @@ -1,7 +0,0 @@ -Source: liteshort -Maintainer: Steven Spangler <132@ikl.sh> - -Package: liteshort -Depends: python3-aiofiles, python3-fastapi, python3-h11, python3-httptools, python3-imutils, python3-jinja2, python3-netifaces, python3-numpy, python3-pydantic, python3-pynetworktables, python3-python-multipart, python3-requests, python3-starlette, python3-toposort, python3-uvicorn, python3-uvloop -Architecture: all -Description: User-friendly, actually lightweight, and configurable URL shortener diff --git a/package/debian/liteshort.service b/package/debian/liteshort.service deleted file mode 120000 index 647522d..0000000 --- a/package/debian/liteshort.service +++ /dev/null @@ -1 +0,0 @@ -../../liteshort.service \ No newline at end of file diff --git a/package/debian/rules b/package/debian/rules deleted file mode 100755 index 75c8e31..0000000 --- a/package/debian/rules +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/make -f - -DISTRIBUTION = buster -VERSION = $(VERSION) -PACKAGEVERSION = $(VERSION)-0~$(DISTRIBUTION)0 -TARBALL = liteshort-$(VERSION).tar.gz -URL = https://github.com/132ikl/liteshort - -%: - dh $@ - -override_dh_auto_clean: -override_dh_auto_test: -override_dh_auto_debian/tmp/build: -override_dh_auto_install: - git clone --depth 1 --branch "v$(VERSION)" "$(URL)" debian/tmp/build/ - mkdir -p debian/liteshort/usr/lib/python3/dist-packages/ - mkdir -p debian/liteshort/usr/bin/ - cp -r debian/tmp/build/liteshort/ debian/liteshort/usr/lib/python3/dist-packages/ - cp debian/tmp/build/liteshort.py debian/liteshort/usr/bin/liteshort - chmod +x debian/liteshort/usr/bin/liteshort -override_dh_gencontrol: - dh_gencontrol -- -v$(PACKAGEVERSION) diff --git a/setup.py b/setup.py index 57bb6fe..234b29a 100644 --- a/setup.py +++ b/setup.py @@ -25,6 +25,6 @@ setuptools.setup( "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", ], - install_requires=["flask~=1.1.2", "bcrypt~=3.1.7", "pyyaml~=5.3.1"], + install_requires=["flask~=1.1.2", "bcrypt~=3.1.7", "pyyaml", "appdirs~=1.4.3"], python_requires=">=3.7", ) diff --git a/setup/liteshort.ini b/setup/liteshort.ini index d085460..7440d3d 100644 --- a/setup/liteshort.ini +++ b/setup/liteshort.ini @@ -4,7 +4,7 @@ module = liteshort.wsgi:app master = true processes = 2 -socket = liteshort.sock +socket = /run/liteshort.sock chmod-socket = 666 vacuum = true diff --git a/setup/liteshort.service b/setup/liteshort.service index 1aad7a0..fadbf81 100644 --- a/setup/liteshort.service +++ b/setup/liteshort.service @@ -3,11 +3,7 @@ Description=uWSGI instance to serve liteshort After=network.target [Service] -User= -Group=www-data -WorkingDirectory=/path/to/install -Environment="PATH=/path/to/install/virtualenv/bin" -ExecStart=/path/to/install/virtualenv/bin/uwsgi --ini liteshort.ini +ExecStart=/usr/bin/uwsgi --ini /etc/liteshort/liteshort.ini [Install] WantedBy=multi-user.target