Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
abuild
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Adélie Linux
abuild
Commits
9221c1d0
Verified
Commit
9221c1d0
authored
Jan 14, 2020
by
A. Wilcox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
newapkbuild: Drastically modernise output APKBUILD file
parent
698abccc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
13 deletions
+31
-13
newapkbuild.in
newapkbuild.in
+31
-13
No files found.
newapkbuild.in
View file @
9221c1d0
...
...
@@ -68,13 +68,9 @@ build_cmake() {
-DCMAKE_BUILD_TYPE=RelWithDebugInfo
\\
-DCMAKE_CXX_FLAGS="
\$
CXXFLAGS"
\\
-DCMAKE_C_FLAGS="
\$
CFLAGS"
\\
\$
{CMAKE_CROSSOPTS}
\$
{CMAKE_CROSSOPTS}
\\
.
make
}
check() {
cd "
\$
builddir"
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
__EOF__
}
...
...
@@ -115,6 +111,12 @@ check_make() {
__EOF__
}
check_cmake
()
{
cat
>>
APKBUILD
<<
__EOF__
CTEST_OUTPUT_ON_FAILURE=TRUE ctest
__EOF__
}
check_python
()
{
cat
>>
APKBUILD
<<
__EOF__
python3 setup.py test
...
...
@@ -193,7 +195,7 @@ newaport() {
python
)
makedepends
=
"python3-dev"
;;
cmake
)
makedepends
=
"cmake"
;;
meson
)
makedepends
=
"meson"
;;
*
)
makedepends
=
"
\$
depends_dev
"
;;
*
)
makedepends
=
""
;;
esac
# Replace pkgver in $source
...
...
@@ -226,9 +228,15 @@ url="$url"
arch="all"
license="
$license
"
depends="
$depends
"
depends_dev=""
makedepends="
$makedepends
"
__EOF__
if
[
-n
"
$install
"
]
;
then
cat
>>
APKBUILD
<<
__EOF__
install="
$install
"
__EOF__
fi
cat
>>
APKBUILD
<<
__EOF__
subpackages="
\$
pkgname-dev
\$
pkgname-doc"
source="
$source
"
__EOF__
...
...
@@ -241,7 +249,12 @@ __EOF__
builddir
=
$(
echo
${
i
#*/
}
|
sed
"s/
$pv
/
\$
pkgver/g"
)
fi
done
printf
'builddir="$srcdir/%s"\n\n'
"
$builddir
"
>>
APKBUILD
if
[
-n
"
$sdir
"
]
&&
[
"
$sdir
"
=
"src/
$pkgname
-
$pv
"
]
;
then
# No builddir needed.
:
else
printf
'builddir="$srcdir/%s"\n\n'
"
$builddir
"
>>
APKBUILD
fi
# Subpackage -dev is usually required only for C/C++. Since depends_dev
# confuses a lot people, remove it if there's no .h or .hpp file.
...
...
@@ -271,7 +284,6 @@ __EOF__
# Create build() function
cat
>>
APKBUILD
<<
__EOF__
build() {
cd "
\$
builddir"
__EOF__
case
"
$buildtype
"
in
...
...
@@ -287,6 +299,8 @@ __EOF__
build_perl
;;
python
)
build_python
;;
*
)
printf
'# Add build instructions here.'
>>
APKBUILD
esac
cat
>>
APKBUILD
<<
__EOF__
...
...
@@ -297,14 +311,17 @@ __EOF__
# Create check() function
cat
>>
APKBUILD
<<
__EOF__
check() {
cd "
\$
builddir"
__EOF__
case
"
$buildtype
"
in
make|
cmake|
autotools|perl
)
make|autotools|perl
)
check_make
;;
cmake
)
check_cmake
;;
python
)
check_python
;;
*
)
printf
'# Add test instructions here.'
>>
APKBUILD
esac
cat
>>
APKBUILD
<<
__EOF__
...
...
@@ -315,7 +332,6 @@ __EOF__
# Create package() function
cat
>>
APKBUILD
<<
__EOF__
package() {
cd "
\$
builddir"
__EOF__
case
"
$buildtype
"
in
...
...
@@ -329,6 +345,8 @@ __EOF__
package_perl
;;
python
)
package_python
;;
*
)
printf
'# Add packaging instructions here.'
>>
APKBUILD
esac
if
[
-n
"
$cpinitd
"
]
;
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment