build: Improve PKGBUILD.tmpl
Simpler package function and use $MAKEFLAGS. There is no longer a need for DESTDIR or POSTFIX in the Sconstruct file anymore, either. Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
f64bf65b37
commit
7816dea1cf
|
@ -17,11 +17,13 @@ md5sums=
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||||
scons
|
scons $MAKEFLAGS
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd "${srcdir}/${pkgname}-${pkgver}"
|
cd "${srcdir}/${pkgname}-${pkgver}"
|
||||||
|
mkdir -p ${pkgdir}/usr
|
||||||
|
mv bin/ lib/ ${pkgdir}/usr/
|
||||||
scons DESTDIR="${pkgdir}" install
|
scons DESTDIR="${pkgdir}" install
|
||||||
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,6 @@
|
||||||
import os, sys
|
import os, sys
|
||||||
import config
|
import config
|
||||||
|
|
||||||
POSTFIX = ""
|
|
||||||
DESTDIR = ""
|
|
||||||
for argv in sys.argv:
|
|
||||||
split = argv.split("=")
|
|
||||||
if split[0] == "DESTDIR":
|
|
||||||
DESTDIR = split[1] + "/"
|
|
||||||
|
|
||||||
FLAGS = ["-O2"]
|
FLAGS = ["-O2"]
|
||||||
if config.DEBUG == True:
|
if config.DEBUG == True:
|
||||||
FLAGS = ["-Wall", "-Werror", "-g", "-DDEBUG"]
|
FLAGS = ["-Wall", "-Werror", "-g", "-DDEBUG"]
|
||||||
|
|
Loading…
Reference in New Issue