Compare commits
8 commits
master
...
debian-pac
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dfab864745 | ||
![]() |
d013928a6c | ||
![]() |
9d1fc0704d | ||
![]() |
81a837ebac | ||
![]() |
41da9480c7 | ||
![]() |
26556d8091 | ||
![]() |
273644d2d7 | ||
![]() |
397f79ffd5 |
13 changed files with 159 additions and 0 deletions
53
.github/workflows/build-deb-package.yml
vendored
Normal file
53
.github/workflows/build-deb-package.yml
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
name: Build Debian Package
|
||||
# Check status: systemctl status changedetection.io.service
|
||||
# Get logs: journalctl -u changedetection.io.service
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build-deb:
|
||||
runs-on: ubuntu-latest
|
||||
name: Build and Package changedetection.io
|
||||
env:
|
||||
PACKAGE_VERSION: 0.48.5 # or load from somewhere else
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: changedetection.io-${{ env.PACKAGE_VERSION }}
|
||||
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
|
||||
- name: Install Build Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
build-essential \
|
||||
devscripts \
|
||||
dh-virtualenv \
|
||||
dh-python \
|
||||
python3-all \
|
||||
python3-all-dev \
|
||||
python3.10 \
|
||||
python3.10-venv \
|
||||
python3.10-dev \
|
||||
debhelper-compat
|
||||
|
||||
- name: Build the Debian Package
|
||||
# Build it the same as the pypi way, then use the same package tar
|
||||
run: |
|
||||
mkdir /tmp/changedetection.io
|
||||
python3 -m build
|
||||
mv dist/*gz .
|
||||
debuild -us -uc
|
||||
|
||||
- name: Upload Debian Package Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: changedetection.io-deb-package
|
||||
path: ../*.deb
|
||||
|
||||
#@todo install and test that some basic content appears
|
|
@ -10,6 +10,8 @@ recursive-include changedetectionio/tests *
|
|||
prune changedetectionio/static/package-lock.json
|
||||
prune changedetectionio/static/styles/node_modules
|
||||
prune changedetectionio/static/styles/package-lock.json
|
||||
prune changedetectionio/tests/test-datastore
|
||||
|
||||
include changedetection.py
|
||||
include requirements.txt
|
||||
include README-pip.md
|
||||
|
@ -18,5 +20,6 @@ global-exclude node_modules
|
|||
global-exclude venv
|
||||
|
||||
global-exclude test-datastore
|
||||
global-exclude changedetectionio/tests/test-datastore
|
||||
global-exclude changedetection.io*dist-info
|
||||
global-exclude changedetectionio/tests/proxy_socks5/test-datastore
|
||||
|
|
4
changedetectionio/__main__.py
Normal file
4
changedetectionio/__main__.py
Normal file
|
@ -0,0 +1,4 @@
|
|||
from . import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
13
debian/changedetection.io.service
vendored
Normal file
13
debian/changedetection.io.service
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=changedetection.io Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=changedetio
|
||||
Group=changedetio
|
||||
WorkingDirectory=/opt/changedetection.io
|
||||
ExecStart=/opt/changedetection.io/bin/python -m changedetectionio
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
13
debian/changedetection.io/lib/systemd/system/changedetection.io.service
vendored
Normal file
13
debian/changedetection.io/lib/systemd/system/changedetection.io.service
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
[Unit]
|
||||
Description=changedetection.io Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
User=changedetio
|
||||
Group=changedetio
|
||||
WorkingDirectory=/opt/changedetection.io
|
||||
ExecStart=/opt/changedetection.io/bin/python -m changedetectionio
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
5
debian/changelog
vendored
Normal file
5
debian/changelog
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
changedetection.io (0.48.5) unstable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Your Name <your.email@example.com> Wed, 01 Nov 2023 12:00:00 +0000
|
14
debian/control
vendored
Normal file
14
debian/control
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
Source: changedetection.io
|
||||
Section: web
|
||||
Priority: optional
|
||||
Maintainer: Your Name <your.email@example.com>
|
||||
Build-Depends: debhelper-compat (= 13), dh-virtualenv, dh-python, python3-all (>= 3.10), python3-all (<< 3.13), python3.10, python3.10-venv
|
||||
Standards-Version: 4.6.0
|
||||
Rules-Requires-Root: no
|
||||
Homepage: https://github.com/dgtlmoon/changedetection.io
|
||||
|
||||
Package: python-changedetection.io
|
||||
Architecture: all
|
||||
Depends: ${misc:Depends}, python3 (>= 3.10), python3 (<< 3.13)
|
||||
Description: Web page change detection - Python application
|
||||
A web-based application for monitoring web pages for changes.
|
1
debian/debhelper-build-stamp
vendored
Normal file
1
debian/debhelper-build-stamp
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
python-changedetection.io
|
1
debian/install
vendored
Normal file
1
debian/install
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
debian/changedetection.io.service lib/systemd/system/
|
23
debian/postinst
vendored
Executable file
23
debian/postinst
vendored
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Determine Python version
|
||||
PYTHON_VERSION=$(ls /usr/bin/python3.1[0-2] | head -n1 | xargs basename)
|
||||
|
||||
# Create 'changedetio' user if it doesn't exist
|
||||
if ! id "changedetio" >/dev/null 2>&1; then
|
||||
adduser --system --group --no-create-home changedetio
|
||||
fi
|
||||
|
||||
# Set ownership of the installation directory
|
||||
chown -R changedetio:changedetio /opt/changedetection.io
|
||||
|
||||
# Update the systemd service file if necessary
|
||||
sed -i "s|ExecStart=.*|ExecStart=/opt/changedetection.io/bin/$PYTHON_VERSION -m changedetectionio|" /lib/systemd/system/changedetection.io.service
|
||||
|
||||
# Enable and start the service
|
||||
systemctl daemon-reload
|
||||
systemctl enable changedetection.io.service
|
||||
systemctl start changedetection.io.service
|
||||
|
||||
exit 0
|
11
debian/postrm
vendored
Executable file
11
debian/postrm
vendored
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Remove user on purge
|
||||
if [ "$1" = "purge" ]; then
|
||||
deluser --system changedetio
|
||||
fi
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
exit 0
|
8
debian/prerm
vendored
Executable file
8
debian/prerm
vendored
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# Stop and disable the service
|
||||
systemctl stop changedetection.io.service
|
||||
systemctl disable changedetection.io.service
|
||||
|
||||
exit 0
|
10
debian/rules
vendored
Executable file
10
debian/rules
vendored
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/usr/bin/make -f
|
||||
|
||||
%:
|
||||
dh $@ --with python-virtualenv --buildsystem=pybuild
|
||||
|
||||
override_dh_virtualenv:
|
||||
dh_virtualenv --sourcedirectory=. \
|
||||
--install-suffix='' \
|
||||
--requirements=requirements.txt \
|
||||
--python=/usr/bin/python3.11
|
Loading…
Add table
Reference in a new issue