Add potentially functional feature to Makefile allowing me to create pkgbuilds with a single command
This commit is contained in:
parent
7b5f582902
commit
27b9ca1cd8
13
Makefile
13
Makefile
|
@ -66,6 +66,7 @@ help:
|
||||||
@echo clean: Removes objects and tarballs.
|
@echo clean: Removes objects and tarballs.
|
||||||
@echo man: Generate man page for spmenu
|
@echo man: Generate man page for spmenu
|
||||||
@echo compat: Installs compatibility with dmenu. WARNING: This will overwrite dmenu and dmenu_run
|
@echo compat: Installs compatibility with dmenu. WARNING: This will overwrite dmenu and dmenu_run
|
||||||
|
@echo pkg_arch: Creates an Arch package based on the PKGBUILD
|
||||||
@echo help: Displays this help sheet.
|
@echo help: Displays this help sheet.
|
||||||
|
|
||||||
man:
|
man:
|
||||||
|
@ -74,4 +75,14 @@ man:
|
||||||
pandoc --standalone --to man .man.md -o spmenu.1
|
pandoc --standalone --to man .man.md -o spmenu.1
|
||||||
rm -f .man.md
|
rm -f .man.md
|
||||||
|
|
||||||
.PHONY: all options clean dist install uninstall help man
|
pkg_arch: dist
|
||||||
|
command -v makepkg > /dev/null || exit 1
|
||||||
|
[ -f PKGBUILD ] && mkdir -p source && cp PKGBUILD *.tar.gz source/ || exit 1
|
||||||
|
cd source/
|
||||||
|
@SUM=$$(md5sum *.tar.gz | awk '{ print $1 }')
|
||||||
|
sed -i "s/VERSION/$(VERSION)/g; s/MD5SUM/$${SUM}/g" PKGBUILD
|
||||||
|
makepkg -sfr --sign && cp *zst* ../
|
||||||
|
cd ..
|
||||||
|
rm -rf source/
|
||||||
|
|
||||||
|
.PHONY: all options clean dist install uninstall pkg_arch help man
|
||||||
|
|
5
PKGBUILD
5
PKGBUILD
|
@ -1,7 +1,7 @@
|
||||||
# Maintainer: speedie <speedie.alt@gmail.com>
|
# Maintainer: speedie <speedie.alt@gmail.com>
|
||||||
|
|
||||||
pkgname=spmenu
|
pkgname=spmenu
|
||||||
pkgver=0.2.1
|
pkgver=VERSION
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="speedie's fork of suckless dmenu with color support and more"
|
pkgdesc="speedie's fork of suckless dmenu with color support and more"
|
||||||
url="https://git.speedie/gq/spmenu"
|
url="https://git.speedie/gq/spmenu"
|
||||||
|
@ -13,10 +13,9 @@ provides=($pkgname)
|
||||||
conflicts=($pkgname)
|
conflicts=($pkgname)
|
||||||
source=(
|
source=(
|
||||||
"$pkgname-$pkgver.tar.gz"
|
"$pkgname-$pkgver.tar.gz"
|
||||||
#"https://ls.speedie.gq/releases/$pkgname/$pkgname-$pkgver.tar.gz"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
md5sums=(98fa925eaa64a2096ab892a8216f5334)
|
md5sums=(MD5SUM)
|
||||||
|
|
||||||
build(){
|
build(){
|
||||||
cd $pkgname-$pkgver
|
cd $pkgname-$pkgver
|
||||||
|
|
Loading…
Reference in a new issue