diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c010bc7 --- /dev/null +++ b/Makefile @@ -0,0 +1,26 @@ +# To be overwritten by user +PKGNAME= +DESTDIR=/ + +# Constants +BINDIR=/usr/bin/ +LIBDIR=/usr/lib/ +CFGDIR=/etc/ + +.PHONY: all +all: install + +.PHONY: install +install: + install -Dm0555 rotate-screen.py '$(DESTDIR)$(BINDIR)'rotate-screen + install -Dm0644 -o0 example.cfg '$(DESTDIR)$(CFGDIR)'rotate-screen.cfg + +.PHONY: check-pkgname +check-pkgname: + [ '$(PKGNAME)' != '' ] # Variable PKGNAME must not be empty + +# This does not remove the launcher from xfce4 +.PHONY: clean +clean: + rm -rf '$(DESTDIR)$(BINDIR)'rotate-screen + rm -rf '$(DESTDIR)$(CFGDIR)'rotate-screen.cfg diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 0000000..bb4add5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,18 @@ +# Maintainer: Daniel Langbein +_pkgname=rotate-screen +_reponame="$_pkgname" +pkgname="$_pkgname" +pkgver=0.1.1 +pkgrel=1 +pkgdesc="Script to rotate screen and devices such as touchscreen and pen input" +arch=('any') +url="https://codeberg.org/privacy1st/${_reponame}" +license=('CC0') +makedepends=('git') # to fetch source(s) via git +source=("git+${url}.git") +sha256sums=('SKIP') # 'SKIP' for git sources + +package() { + cd "${_reponame}" + make DESTDIR="$pkgdir/" install +} diff --git a/de-p1st-rotate.py b/rotate-screen.py similarity index 100% rename from de-p1st-rotate.py rename to rotate-screen.py