Added PKGBUILD & CI pipeline for publishing

main
Jef Roosens 2022-03-05 10:28:01 +01:00
parent 93b21c779d
commit 7630d80f21
Signed by: Jef Roosens
GPG Key ID: B580B976584B5F30
4 changed files with 84 additions and 2 deletions

27
.woodpecker.yml 100644
View File

@ -0,0 +1,27 @@
branches: master
when:
event: push
pipeline:
build:
image: 'archlinux:latest'
commands:
# Update packages
- pacman -Syu --needed --noconfirm base-devel
# Create non-root user to perform build & switch to their home
- groupadd -g 1000 builder
- useradd -mg builder builder
- chown -R builder:builder "$PWD"
- "echo 'builder ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers"
- su builder
# Build the package
- MAKEFLAGS="-j$(nproc)" makepkg -s --noconfirm --needed
publish:
image: 'archlinux:latest'
commands:
# Publish the package
- 'curl -s -XPOST -H "X-API-KEY: $API_KEY" -T "$(ls *.pkg*)" https://arch.r8r.be/publish'
secrets:
- api_key

View File

@ -42,7 +42,9 @@ dist: clean
install: all
mkdir -p $(DESTDIR)$(PREFIX)/bin
cp -f dmenu dmenu_path dmenu_run stest $(DESTDIR)$(PREFIX)/bin
cp -f dmenu stest $(DESTDIR)$(PREFIX)/bin
cp -f dmenu_path.sh $(DESTDIR)$(PREFIX)/bin/dmenu_path
cp -f dmenu_run.sh $(DESTDIR)$(PREFIX)/bin/dmenu_run
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_path
chmod 755 $(DESTDIR)$(PREFIX)/bin/dmenu_run

53
PKGBUILD 100644
View File

@ -0,0 +1,53 @@
# Maintainer: Jef Roosens
pkgname="jjr-dmenu"
pkgver="5.1"
pkgrel=1
pkgdesc="Chewing_Bever's custom build of Suckless's dmenu."
arch=("x86_64")
url="https://git.rustybever.be/Chewing_Bever/dmenu"
license=("MIT")
depends=("libxinerama" "libxft" "fontconfig" "freetype2")
makedepends=("glibc" "gcc")
provides=("dmenu")
conflicts=("dmenu-git")
source=("arg.h" "config.h" "config.mk" "dmenu.1" "dmenu.c" "dmenu_path.sh"
"dmenu_run.sh" "drw.c" "drw.h" "LICENSE" "Makefile" "README" "stest.1"
"stest.c" "util.c" "util.h")
sha256sums=('9ed2b2e3396fdebc8ecab2cdbb09db115cca015f63ec0443b8ccc56340b6b03c'
'7720b411b3bd1da5ee547711c03a10bcf456bf235c44f624e83108ea6b9f53ed'
'72a08af1c5846331eae8268294aa66ca7be58c675084ece0a3ba6bbe21d5c943'
'5b078d9606bceb8ac0acbd0580ef0a232c77fff92775d6db7dda2ecb8011ef19'
'1f2db0b593ad88aa20e79af395f84e5473fe0b7c3aaac456f0b6b21961325bc2'
'a3f19e648e20eb80532dfe87e9bd9feeaa92df838e6ecc061f274c9da579d617'
'564035fd8a8ade6504521d98fa10e8732e135403d546d04ca77316fe4a67b21c'
'a7c7358ce13c8571044b79d5d91d01314d9174793474a27faa37d23c75ab603f'
'c35796210ea8410ae096025cc0d7996dccb3d9936306dff7531a0bb253e079f5'
'9f8e922fcfc18ffcc4975dd0b1bee38302bd4e0c538251dfef6d77cd7ed59c89'
'c32b5173eddf376296af085725cb878e4ca2603d4fda8bba3faac6a2bb1b4390'
'ec98e8759049af796598f0790752a21a69eaea1d438b09c39922d4a9f4a7cfe2'
'00d3389ef8858a565cf3fb3445620b90eb67d1a9b31434f4d54b05ed6c5abefb'
'ba76404e61abbd734e315999ffe4e883419c4c69ff17a5d4d88a5cd11dd4b055'
'dec870d0b5834c9008ff62f495710daf524cffdf12d0cf8ba4fadf5643623987'
'1196a7b6efbf4cb3f5c435fffd72e7647f977483845d5c78c1c48d9ab8b96819')
build() {
make
}
package() {
local installopts='--mode 0644 -D --target-directory'
local shrdir="$pkgdir/usr/share"
local licdir="$shrdir/licenses/$pkgname"
local docdir="$shrdir/doc/$pkgname"
make PREFIX=/usr DESTDIR="$pkgdir" install
install $installopts "$licdir" "LICENSE"
install $installopts "$docdir" "README"
# install $installopts "$docdir" README.terminfo.rst
# install $installopts "$shrdir/$pkgname" "$_sourcedir/st.info"
}

View File

@ -24,7 +24,7 @@ LIBS = -L$(X11LIB) -lX11 $(XINERAMALIBS) $(FREETYPELIBS)
# flags
CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_POSIX_C_SOURCE=200809L -DVERSION=\"$(VERSION)\" $(XINERAMAFLAGS)
CFLAGS = -std=c99 -pedantic -Wall -Os $(INCS) $(CPPFLAGS)
CFLAGS = -std=c99 -pedantic -Wall -O3 $(INCS) $(CPPFLAGS)
LDFLAGS = $(LIBS)
# compiler and linker