Last active
March 20, 2019 13:55
-
-
Save quequotion/95e85f4442ea4749e4ba999af1bc0a5a to your computer and use it in GitHub Desktop.
Test PKGBUILD for examining how flags are passed to various functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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