Skip to content

Instantly share code, notes, and snippets.

@quequotion
Last active Mar 20, 2019
Embed
What would you like to do?
Test PKGBUILD for examining how flags are passed to various functions
#Maintainer: Packaging Tester <test@pacman>
pkgname=testpkg
pkgver=1
pkgrel=1
pkgdesc="A package for testing"
arch=('any')
url="https://www.archlinux.org/pacman/"
license=('GPL')
makedepends=('pacman')
depends=('pacman')
options=('!ccache' '!distcc' "buildflags" "makeflags" "!debug")
msg2 "Read PKGBUILD header"
msg2 "cppflags ${CPPFLAGS}"
msg2 "cflags ${CFLAGS}"
msg2 "cxxflags ${CXXFLAGS}"
msg2 "ldflags ${LDFLAGS}"
msg2 "makeflags ${MAKEFLAGS}"
#unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS
prepare() {
msg2 "cppflags ${CPPFLAGS}"
msg2 "cflags ${CFLAGS}"
msg2 "cxxflags ${CXXFLAGS}"
msg2 "ldflags ${LDFLAGS}"
msg2 "makeflags ${MAKEFLAGS}"
#unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS
}
build() {
msg2 "cppflags ${CPPFLAGS}"
msg2 "cflags ${CFLAGS}"
msg2 "cxxflags ${CXXFLAGS}"
msg2 "ldflags ${LDFLAGS}"
msg2 "makeflags ${MAKEFLAGS}"
#unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS
}
check() {
msg2 "cppflags ${CPPFLAGS}"
msg2 "cflags ${CFLAGS}"
msg2 "cxxflags ${CXXFLAGS}"
msg2 "ldflags ${LDFLAGS}"
msg2 "makeflags ${MAKEFLAGS}"
#unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS
}
package() {
msg2 "cppflags ${CPPFLAGS}"
msg2 "cflags ${CFLAGS}"
msg2 "cxxflags ${CXXFLAGS}"
msg2 "ldflags ${LDFLAGS}"
msg2 "makeflags ${MAKEFLAGS}"
#unset CPPFLAGS CFLAGS CXXFLAGS LDFLAGS MAKEFLAGS
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment