~dricottone/container-images

ref: 5c547f704917111492a08dc5e8ed70bee79b03e8 container-images/apkbuilder/README.md -rw-r--r-- 1.7 KiB
5c547f70Dominic Ricottone Quick fix 11 months ago
                                                                                
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
# apkbuilder


## Build and Deploy

```
make image
```


### Tags

 + `latest`

----

## Use

Builds APK packages.
Not meant for humans.
See https://git.dominic-ricottone.com/~dricottone/simple-builder .

Create an abuild folder containing:

 * an `abuild.conf` file
 * packaging keys

For the former, try a configuration like:

```
export CFLAGS="-Os -fomit-frame-pointer"
export CXXFLAGS="$CFLAGS"
export CPPFLAGS="$CFLAGS"
export LDFLAGS="-Wl,--as-needed,-O1,--sort-common"
export GOFLAGS="-buildmode=pie -modcacherw -trimpath -buildvcs=false"
# Do note that these should work with at least GDC and LDC
export DFLAGS="-Os"

export JOBS=$(nproc)
export MAKEFLAGS=-j$JOBS
export SAMUFLAGS=-j$JOBS
export CARGO_BUILD_JOBS=$JOBS

export CARGO_PROFILE_RELEASE_OPT_LEVEL="s"
export CARGO_PROFILE_RELEASE_PANIC="abort"
export CARGO_PROFILE_RELEASE_CODEGEN_UNITS=1
export CARGO_PROFILE_RELEASE_LTO="true"

#USE_COLORS=1

#USE_CCACHE=1

SRCDEST=/var/cache/distfiles

# uncomment line below to store built packages in other location
# The package will be stored as $REPODEST/$repo/$pkgname-$pkgver-r$pkgrel.apk
# where $repo is the name of the parent directory of $startdir.
REPODEST=$HOME/packages

PACKAGER="Dominic Ricottone <me@dominic-ricottone.com>"
PACKAGER_PRIVKEY="/home/builder/.abuild/me@dominic-ricottone.com.rsa"
MAINTAINER="$PACKAGER"

# what to clean up after a successful build
CLEANUP="srcdir bldroot pkgdir deps"

# what to cleanup after a failed build
ERROR_CLEANUP="bldroot deps"
```

For the latter, try:

```
openssl genrsa -out abuild/me@dominic-ricottone.com.rsa 2048
openssl rsa -in abuild/me@dominic-ricottone.com.rsa -pubout -out abuild/me@dominic-ricottone.com.rsa.pub
```