add Makefile, PKGBUILD

This commit is contained in:
Daniel Langbein 2022-05-22 14:01:25 +02:00
parent d6e11fcdf9
commit bdefcf18d8
3 changed files with 44 additions and 0 deletions

26
Makefile Normal file
View File

@ -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

18
PKGBUILD Normal file
View File

@ -0,0 +1,18 @@
# Maintainer: Daniel Langbein <daniel@systemli.org>
_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
}