1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
From c95263d877ca3ed953de0a114b2c1ccb9aa04b65 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=B6ren=20Tempel?= <soeren+git@soeren-tempel.net>
Date: Tue, 4 Apr 2017 17:55:50 +0200
Subject: [PATCH 1/2] 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: 36d5193776180385a39626a83241822736a5f6b8
---
newapkbuild.in | 28 +++++++++++++---------------
sample.APKBUILD | 6 +++---
2 files changed, 16 insertions(+), 18 deletions(-)
diff --git a/newapkbuild.in b/newapkbuild.in
index c021db5..bbe7a44 100644
--- a/newapkbuild.in
+++ b/newapkbuild.in
@@ -33,7 +33,7 @@ is_github_url() {
# Build sections
build_make() {
cat >>APKBUILD<<__EOF__
- make || return 1
+ make
__EOF__
}
@@ -45,9 +45,8 @@ build_autotools() {
--prefix=/usr \\
--sysconfdir=/etc \\
--mandir=/usr/share/man \\
- --localstatedir=/var \\
- || return 1
- make || return 1
+ --localstatedir=/var
+ make
__EOF__
}
@@ -71,29 +70,28 @@ build_cmake() {
-DCMAKE_BUILD_TYPE=Release \\
-DCMAKE_CXX_FLAGS="\$CXXFLAGS" \\
-DCMAKE_C_FLAGS="\$CFLAGS" \\
- ${CMAKE_CROSSOPTS} \\
- || return 1
- make || return 1
+ ${CMAKE_CROSSOPTS}
+ make
__EOF__
}
build_perl() {
cat >>APKBUILD<<__EOF__
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
- make || return 1
+ PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+ make
__EOF__
}
build_python() {
cat >>APKBUILD<<__EOF__
- python setup.py build || return 1
+ python setup.py build
__EOF__
}
# Package sections
package_make() {
cat >>APKBUILD<<__EOF__
- make DESTDIR="\$pkgdir" install || return 1
+ make DESTDIR="\$pkgdir" install
__EOF__
}
@@ -103,14 +101,14 @@ package_autotools() {
package_perl() {
cat >>APKBUILD<<__EOF__
- make DESTDIR="\$pkgdir" install || return 1
+ make DESTDIR="\$pkgdir" install
find "\$pkgdir" \\( -name perllocal.pod -o -name .packlist \\) -delete
__EOF__
}
package_python() {
cat >>APKBUILD<<__EOF__
- python setup.py install --prefix=/usr --root="\$pkgdir" || return 1
+ python setup.py install --prefix=/usr --root="\$pkgdir"
__EOF__
}
@@ -273,9 +271,9 @@ __EOF__
cat >>APKBUILD<<__EOF__
install -m755 -D "\$srcdir"/\$pkgname.initd \\
- "\$pkgdir"/etc/init.d/\$pkgname || return 1
+ "\$pkgdir"/etc/init.d/\$pkgname
install -m644 -D "\$srcdir"/\$pkgname.confd \\
- "\$pkgdir"/etc/conf.d/\$pkgname || return 1
+ "\$pkgdir"/etc/conf.d/\$pkgname
__EOF__
fi
cat >>APKBUILD<<__EOF__
diff --git a/sample.APKBUILD b/sample.APKBUILD
index 30184c5..95a6634 100644
--- a/sample.APKBUILD
+++ b/sample.APKBUILD
@@ -31,12 +31,12 @@ build() {
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info
- make || return 1
+ make
}
package() {
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
# 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
# is run using "make check", which is the default for autotools-based build systems.
# cd "$builddir"
- # make check || return 1
+ # make check
}
md5sums="" #generate with 'abuild checksum'
--
2.12.2
|