diff options
author | xengineering <mail2xengineering@protonmail.com> | 2021-07-09 08:03:24 +0200 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2021-07-09 08:03:24 +0200 |
commit | 284df2a0655d85d79f83ee6838e2a0205dd5b034 (patch) | |
tree | 5962db2017167ac9083d9c5e825e6593dffb335d | |
parent | be4b9c496ebab482a5a0a678f51cdaed76a5207b (diff) | |
download | birdscan-284df2a0655d85d79f83ee6838e2a0205dd5b034.tar birdscan-284df2a0655d85d79f83ee6838e2a0205dd5b034.tar.zst birdscan-284df2a0655d85d79f83ee6838e2a0205dd5b034.zip |
Embed Arch Linux PKGBUILD in Source Repository
-rw-r--r-- | Makefile | 1 | ||||
-rw-r--r-- | README.md | 18 | ||||
-rw-r--r-- | archlinux/Makefile | 20 | ||||
-rw-r--r-- | archlinux/PKGBUILD | 37 | ||||
-rw-r--r-- | src/Makefile | 2 |
5 files changed, 72 insertions, 6 deletions
@@ -12,6 +12,7 @@ all: clean: make -C python clean make -C src clean + rm -rf .pytest_cache install: all make -C python install DESTDIR=$(abspath $(DESTDIR)) @@ -11,7 +11,7 @@ The complete system consists of two machines: The Raspberry Pi runs a web server as the main user interface. With this interface the user can take pictures manually. Afterwards the pictures are transferred via SSH to the file server. -**Current State**: Although the software runs well and stable, it does so only thanks to some tricks. Also, the documentation is not yet sufficient and the installation process is not fully published. It is possible to use it, but it is recommended to wait until the first release. +**Current State**: Although the software runs well and stable, it does so only thanks to some tricks. Also, the documentation is not yet sufficient and the installation process is not fully published. It is possible to use it, but it is recommended to wait until a stable release (1.x). ## Expected Environment / Target Platform @@ -40,19 +40,27 @@ Installation is currently just supported for Arch Linux. Install and configure birdscan in these few steps on an Arch Linux system: ``` +# create directory for Arch Build System mkdir -p ~/ABS # create a directory for the arch build system cd ~/ABS + +# install picamera dependency from AUR (Arch User Repository) git clone https://aur.archlinux.org/python-picamera.git # download picamera from AUR cd picamera makepkg -si # build and install picamera dependency -mkdir ../birdscan -cd ../birdscan -# (download PKGBUILD for birdscan to current directory FIXME: insert link here) -makepkg -si # build and install birdscan + +# clone, compile and install birdscan +cd ../ +git clone https://src.xengineering.eu/xengineering/birdscan.git +cd birdscan +make -C archlinux all # builds the Arch package in the archlinux subfolder +make -C archlinux install # installs the Arch package ``` ### SSH and File Server Setup +`TODO`: This section needs more details ... + Some notes: ``` ssh-keygen -y -f ~/.ssh/id_rsa # generates and prints public key of this private one diff --git a/archlinux/Makefile b/archlinux/Makefile new file mode 100644 index 0000000..b8f8862 --- /dev/null +++ b/archlinux/Makefile @@ -0,0 +1,20 @@ +# vim: shiftwidth=4 tabstop=4 noexpandtab + +.PHONY: all clean install uninstall + +SOFTWARE_NAME="birdscan" + +all: + tar --exclude-vcs --exclude $(SOFTWARE_NAME)/archlinux -czvf $(SOFTWARE_NAME).tar.gz ../../$(SOFTWARE_NAME) + makepkg -cf + +clean: + rm -rf $(SOFTWARE_NAME).tar.gz + rm -rf $(SOFTWARE_NAME)*.pkg.tar.* + +install: all + sudo pacman -U $(SOFTWARE_NAME)*.pkg.tar.* + +uninstall: + sudo pacman -R $(SOFTWARE_NAME) + diff --git a/archlinux/PKGBUILD b/archlinux/PKGBUILD new file mode 100644 index 0000000..c61ab99 --- /dev/null +++ b/archlinux/PKGBUILD @@ -0,0 +1,37 @@ + +# Maintainer: xengineering <mail2xengineering@protonmail.com> +pkgname=birdscan +pkgver=0.0.1 +pkgrel=1 +epoch= +pkgdesc="A software to take beautiful pictures of birds with a Raspberry Pi Camera" +arch=("armv7h" "x86_64") +url="https://xengineering.eu" +license=("AGPL3") +groups=() +depends=("licenses" "python") +makedepends=("go") +checkdepends=() +optdepends=() +provides=() +conflicts=() +replaces=() +backup=("etc/birdscan/config.json") +options=() +install= +changelog= +source=("${pkgname}.tar.gz") +noextract=() +md5sums=("SKIP") +validpgpkeys=() + +build() { + cd "$pkgname" # -$pkgver" + make all +} + +package() { + cd "$pkgname" # -$pkgver" + make install DESTDIR=$pkgdir +} + diff --git a/src/Makefile b/src/Makefile index df30260..f475632 100644 --- a/src/Makefile +++ b/src/Makefile @@ -22,6 +22,6 @@ clean: install: all install -Dm 755 build/birdscan $(DESTDIR)$(PREFIX)/bin/birdscan -debug: all +debug: go run ./... -c ../config/default.json -d true |