newapkbuild: build and package sections for 'make' buildtype

This buildtype is when there is a simple Makefile only.
This commit is contained in:
Natanael Copa 2011-06-28 07:18:15 +00:00
parent 91c0772347
commit 15718f9cf9

View File

@ -33,6 +33,12 @@ is_url() {
} }
# Build sections # Build sections
build_make() {
cat >>APKBUILD<<__EOF__
make || return 1
__EOF__
}
build_autotools() { build_autotools() {
cat >>APKBUILD<<__EOF__ cat >>APKBUILD<<__EOF__
./configure --prefix=/usr \\ ./configure --prefix=/usr \\
@ -59,13 +65,17 @@ __EOF__
} }
# Package sections # Package sections
package_autotools() { package_make() {
cat >>APKBUILD<<__EOF__ cat >>APKBUILD<<__EOF__
make DESTDIR="\$pkgdir" install || return 1 make DESTDIR="\$pkgdir" install || return 1
rm -f "\$pkgdir"/usr/lib/*.la rm -f "\$pkgdir"/usr/lib/*.la
__EOF__ __EOF__
} }
package_autotools() {
package_make
}
package_perl() { package_perl() {
cat >>APKBUILD<<__EOF__ cat >>APKBUILD<<__EOF__
make DESTDIR="\$pkgdir" install || return 1 make DESTDIR="\$pkgdir" install || return 1
@ -200,6 +210,8 @@ build() {
__EOF__ __EOF__
case "$buildtype" in case "$buildtype" in
make)
build_make;;
autotools) autotools)
build_autotools;; build_autotools;;
perl) perl)
@ -220,6 +232,8 @@ package() {
__EOF__ __EOF__
case "$buildtype" in case "$buildtype" in
make)
package_make;;
autotools) autotools)
package_autotools;; package_autotools;;
perl) perl)