mirror of
https://codeberg.org/privacy1st/netcup-dns
synced 2024-12-22 23:36:04 +01:00
feat: update makefile (Arch Linux installation)
This commit is contained in:
parent
4b5193ee7a
commit
84568a2402
4
.gitignore
vendored
4
.gitignore
vendored
@ -3,3 +3,7 @@
|
|||||||
/venv/
|
/venv/
|
||||||
/build/
|
/build/
|
||||||
**/*.egg-info/
|
**/*.egg-info/
|
||||||
|
|
||||||
|
# makepkg
|
||||||
|
/packaging/netcup-dns/
|
||||||
|
/packaging/python-netcup-dns-git-*-any.pkg.tar.zst
|
||||||
|
26
Makefile
26
Makefile
@ -4,8 +4,18 @@ PKGNAME := netcup-dns
|
|||||||
all: install
|
all: install
|
||||||
|
|
||||||
.PHONY: install
|
.PHONY: install
|
||||||
install: nc-dnsapi requests notify cron
|
install: cron
|
||||||
|
sudo pacman -S --needed base-devel
|
||||||
|
cd packaging && makepkg -fCcsri && rm -rf $(PKGNAME)
|
||||||
|
${MAKE} install-files
|
||||||
|
|
||||||
|
.PHONY: install-pip
|
||||||
|
install-pip: nc-dnsapi requests exec-notify cron
|
||||||
sudo python3 -m pip install --upgrade --force-reinstall .
|
sudo python3 -m pip install --upgrade --force-reinstall .
|
||||||
|
${MAKE} install-files
|
||||||
|
|
||||||
|
.PHONY: install-files
|
||||||
|
install-files:
|
||||||
sudo install -m0644 cron.d/$(PKGNAME) /etc/cron.d/$(PKGNAME)
|
sudo install -m0644 cron.d/$(PKGNAME) /etc/cron.d/$(PKGNAME)
|
||||||
|
|
||||||
sudo install --directory -m755 /etc/$(PKGNAME)/
|
sudo install --directory -m755 /etc/$(PKGNAME)/
|
||||||
@ -19,8 +29,8 @@ nc-dnsapi:
|
|||||||
requests:
|
requests:
|
||||||
pip list | cut -f 1 -d ' ' | grep '^requests$$' || sudo pacman -S --needed python-requests
|
pip list | cut -f 1 -d ' ' | grep '^requests$$' || sudo pacman -S --needed python-requests
|
||||||
|
|
||||||
.PHONY: notify ## Check if exec-notify is installed.
|
.PHONY: exec-notify ## Check if exec-notify is installed.
|
||||||
notify:
|
exec-notify:
|
||||||
# `type` does not work e.g. on Ubuntu 18.04
|
# `type` does not work e.g. on Ubuntu 18.04
|
||||||
which exec-notify
|
which exec-notify
|
||||||
|
|
||||||
@ -31,7 +41,13 @@ cron:
|
|||||||
# Check if cron is running
|
# Check if cron is running
|
||||||
pgrep cron
|
pgrep cron
|
||||||
|
|
||||||
.PHONY: clean
|
clean: clean-files
|
||||||
clean:
|
sudo pacman -Rns python-$(PKGNAME)-git
|
||||||
|
|
||||||
|
.PHONY: clean-pip
|
||||||
|
clean-pip: clean-files
|
||||||
sudo python3 -m pip uninstall -y $(PKGNAME)
|
sudo python3 -m pip uninstall -y $(PKGNAME)
|
||||||
|
|
||||||
|
.PHONY: clean-files
|
||||||
|
clean-files:
|
||||||
sudo rm -rf /etc/cron.d/$(PKGNAME) /etc/$(PKGNAME)
|
sudo rm -rf /etc/cron.d/$(PKGNAME) /etc/$(PKGNAME)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
_name=netcup-dns
|
_name=netcup-dns
|
||||||
pkgname="python-$_name-git"
|
pkgname="python-$_name-git"
|
||||||
pkgver=0.1.0
|
pkgver=r16.4b5193e
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc='update DNS records with your current external IP address using the netcup DNS API'
|
pkgdesc='update DNS records with your current external IP address using the netcup DNS API'
|
||||||
arch=(any)
|
arch=(any)
|
||||||
|
Loading…
Reference in New Issue
Block a user