Skip to content

Commit

Permalink
Fix apk build
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru committed Apr 25, 2024
1 parent 73ffa57 commit 69cf3b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions apk/templates/APKBUILD.github-binary
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ source="${DOWNLOAD_URL}"
source_filename="$(basename $DOWNLOAD_URL)"

unpack() {
echo "Unpack"
## default_unpack does not handle gzipped binaries
## Copy liberally from https://github.com/alpinelinux/abuild/blob/v3.1.0/abuild.in#L403-L442
## to preserve invariants
Expand Down Expand Up @@ -129,6 +130,7 @@ prepare() {
# This is the compilation stage.
# Function will be called as the current user
build() {
echo "Build"
cd "$builddir"
echo "Build dir: ls -l $(pwd)"
ls -l $(pwd)
Expand All @@ -139,12 +141,14 @@ build() {
# This function is called right after the build stage.
# It should check that the packaged thing is actually working
check() {
echo "Check"
make -C ${APK_TMP_DIR} --no-print-directory -s test PATH="$PATH:$srcdir" HOME=/tmp
}

# This is the packaging stage.
# The built application and support files should be installed into $pkgdir.
package() {
echo "Package"
echo "Installing packges to ${pkgdir}"
mkdir -p "${pkgdir}/${installdir}"
for cmd in ${exe}; do
Expand Down
6 changes: 5 additions & 1 deletion vendor/slack-notifier/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Package details
export VENDOR ?= cloudposse
export PACKAGE_EXE := slack-notifier
install: export PACKAGE_NAME = slack-notifier_v$(PACKAGE_VERSION)
export PACKAGE_NAME = slack-notifier_v$(PACKAGE_VERSION)
# PACKAGE_URL
# https://github.com/cloudposse/slack-notifier/releases/download/0.9.0/slack-notifier_0.9.0_linux_arm64.zip
export DOWNLOAD_URL = https://github.com/cloudposse/slack-notifier/releases/download/$(PACKAGE_VERSION)/$(PACKAGE_EXE)_$(PACKAGE_VERSION)_$(OS)_$(ARCH).zip
Expand All @@ -17,3 +17,7 @@ install:

test:
($(PACKAGE_EXE) || true) 2>&1 | grep author_icon
# Custom post-package processing (Note the double colon to append to current inherited package/prepare task)
## This may be required for apk building
package/prepare::
mv src/$(PACKAGE_NAME) src/$(PACKAGE_EXE)

0 comments on commit 69cf3b6

Please sign in to comment.