remove explicit || return 1 from all sample APKBUILDs

Those statement are no longer needed because abuild now runs with
`set -e` by default.

See also: 36d5193776
This commit is contained in:
Sören Tempel 2017-04-04 17:55:50 +02:00 committed by Natanael Copa
parent ecc1f509c6
commit c95263d877
2 changed files with 16 additions and 18 deletions

View File

@ -33,7 +33,7 @@ is_github_url() {
# Build sections # Build sections
build_make() { build_make() {
cat >>APKBUILD<<__EOF__ cat >>APKBUILD<<__EOF__
make || return 1 make
__EOF__ __EOF__
} }
@ -45,9 +45,8 @@ build_autotools() {
--prefix=/usr \\ --prefix=/usr \\
--sysconfdir=/etc \\ --sysconfdir=/etc \\
--mandir=/usr/share/man \\ --mandir=/usr/share/man \\
--localstatedir=/var \\ --localstatedir=/var
|| return 1 make
make || return 1
__EOF__ __EOF__
} }
@ -71,29 +70,28 @@ build_cmake() {
-DCMAKE_BUILD_TYPE=Release \\ -DCMAKE_BUILD_TYPE=Release \\
-DCMAKE_CXX_FLAGS="\$CXXFLAGS" \\ -DCMAKE_CXX_FLAGS="\$CXXFLAGS" \\
-DCMAKE_C_FLAGS="\$CFLAGS" \\ -DCMAKE_C_FLAGS="\$CFLAGS" \\
${CMAKE_CROSSOPTS} \\ ${CMAKE_CROSSOPTS}
|| return 1 make
make || return 1
__EOF__ __EOF__
} }
build_perl() { build_perl() {
cat >>APKBUILD<<__EOF__ cat >>APKBUILD<<__EOF__
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1 PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
make || return 1 make
__EOF__ __EOF__
} }
build_python() { build_python() {
cat >>APKBUILD<<__EOF__ cat >>APKBUILD<<__EOF__
python setup.py build || return 1 python setup.py build
__EOF__ __EOF__
} }
# Package sections # Package sections
package_make() { package_make() {
cat >>APKBUILD<<__EOF__ cat >>APKBUILD<<__EOF__
make DESTDIR="\$pkgdir" install || return 1 make DESTDIR="\$pkgdir" install
__EOF__ __EOF__
} }
@ -103,14 +101,14 @@ package_autotools() {
package_perl() { package_perl() {
cat >>APKBUILD<<__EOF__ cat >>APKBUILD<<__EOF__
make DESTDIR="\$pkgdir" install || return 1 make DESTDIR="\$pkgdir" install
find "\$pkgdir" \\( -name perllocal.pod -o -name .packlist \\) -delete find "\$pkgdir" \\( -name perllocal.pod -o -name .packlist \\) -delete
__EOF__ __EOF__
} }
package_python() { package_python() {
cat >>APKBUILD<<__EOF__ cat >>APKBUILD<<__EOF__
python setup.py install --prefix=/usr --root="\$pkgdir" || return 1 python setup.py install --prefix=/usr --root="\$pkgdir"
__EOF__ __EOF__
} }
@ -273,9 +271,9 @@ __EOF__
cat >>APKBUILD<<__EOF__ cat >>APKBUILD<<__EOF__
install -m755 -D "\$srcdir"/\$pkgname.initd \\ install -m755 -D "\$srcdir"/\$pkgname.initd \\
"\$pkgdir"/etc/init.d/\$pkgname || return 1 "\$pkgdir"/etc/init.d/\$pkgname
install -m644 -D "\$srcdir"/\$pkgname.confd \\ install -m644 -D "\$srcdir"/\$pkgname.confd \\
"\$pkgdir"/etc/conf.d/\$pkgname || return 1 "\$pkgdir"/etc/conf.d/\$pkgname
__EOF__ __EOF__
fi fi
cat >>APKBUILD<<__EOF__ cat >>APKBUILD<<__EOF__

View File

@ -31,12 +31,12 @@ build() {
--sysconfdir=/etc \ --sysconfdir=/etc \
--mandir=/usr/share/man \ --mandir=/usr/share/man \
--infodir=/usr/share/info --infodir=/usr/share/info
make || return 1 make
} }
package() { package() {
cd "$builddir" cd "$builddir"
make DESTDIR="$pkgdir" install || return 1 make DESTDIR="$pkgdir" install
# remove the 2 lines below (and this) if there is no init.d script # remove the 2 lines below (and this) if there is no init.d script
# install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
@ -47,7 +47,7 @@ check() {
# uncomment the 2 lines below if there is a testsuite. we assume the testsuite # uncomment the 2 lines below if there is a testsuite. we assume the testsuite
# is run using "make check", which is the default for autotools-based build systems. # is run using "make check", which is the default for autotools-based build systems.
# cd "$builddir" # cd "$builddir"
# make check || return 1 # make check
} }
md5sums="" #generate with 'abuild checksum' md5sums="" #generate with 'abuild checksum'