From 344dc42eba8cc607ad89761f97ced94ef672b7c5 Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Wed, 12 Jul 2023 18:19:29 +0200 Subject: [PATCH] package --- .gitignore | 1 + APKBUILD | 20 ++++++++++++++++++++ Makefile | 22 ++++++++++++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 .gitignore create mode 100644 APKBUILD create mode 100644 Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..335ec95 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.tar.gz diff --git a/APKBUILD b/APKBUILD new file mode 100644 index 0000000..b3e7919 --- /dev/null +++ b/APKBUILD @@ -0,0 +1,20 @@ +# Contributor: Marty Sluijtman +# Maintainer: Marty Sluijtman +pkgname=pwr-switch +pkgver=1.0 +pkgrel=0 +arch="noarch" +pkgdesc="A wrapper around my pwr-switch config" +url="https://voidcruiser.nl/rambles/pwr-switch" +license="WTFPL" +source="https://alpine.voidcruiser.nl/src/pwr-switch-1.0.tar.gz" +build(){ + return 0 +} + +package(){ + make install PREFIX=/usr DESTDIR="$pkgdir" +} +sha512sums=" +93dea84a8cefa40fea20f41c4131169a95f71ebd39fd7123a284114b279d1b9d4a78fc98bdd67e9c18754850a5ad56f6b1c92a9d96b41673db62aa4d094a0619 pwr-switch-1.0.tar.gz +" diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..5579e39 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +NAME = pwr-switch +VERSION = 1.0 +DIRNAME = $(NAME)-$(VERSION) +PREFIX = /usr/local + +dist: + mkdir -p $(DIRNAME) + cp $(NAME) Makefile LICENSE README.md $(DIRNAME) + tar zcf $(DIRNAME).tar.gz $(DIRNAME) + rm -rf $(DIRNAME) + +clean: + rm -f $(DIRNAME).tar.gz + +install: + install -dm 0755 $(DESTDIR)$(PREFIX)/sbin + install -m 0775 $(NAME) $(DESTDIR)$(PREFIX)/sbin + +uninstall: + rm -f $(DESTDIR)$(PREFIX)/sbin/$(NAME) + +.PHONY: install uninstall