/
org.freedesktop.Sdk.Extension.openjdk.yaml
163 lines (163 loc) · 6.41 KB
/
org.freedesktop.Sdk.Extension.openjdk.yaml
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
---
id: org.freedesktop.Sdk.Extension.openjdk
branch: '21.08'
runtime: org.freedesktop.Sdk
runtime-version: '21.08'
build-extension: true
sdk: org.freedesktop.Sdk
separate-locales: false
appstream-compose: false
cleanup:
- /share/info
- /share/man
build-options:
no-debuginfo: true
strip: true
prefix: /usr/lib/sdk/openjdk
env:
V: '1'
modules:
- name: bootstrap_jdk
buildsystem: simple
cleanup:
- '*'
sources:
- type: file
only-arches:
- x86_64
url: https://fedorapeople.org/~mbooth/bootstrap_jdk/bootstrap-openjdk-16.0.1.0.9-1.rolling.fc32.x86_64.tar.bz2
dest-filename: java-openjdk.tar.bz2
sha512: 0084f99558a73788438df4fe62700584b41ee962d7de7bd322d8950207c88acfb3839c788def906926325f782ae86068315352dfc3b8c6d5375dec192cf3adeb
- type: file
only-arches:
- aarch64
url: https://fedorapeople.org/~mbooth/bootstrap_jdk/bootstrap-openjdk-16.0.1.0.9-1.rolling.fc32.aarch64.tar.bz2
dest-filename: java-openjdk.tar.bz2
sha512: a96e7fc8fdba6bb7a374e2f1f293aca567777b447ae30ac469ef2f38e2704dfa236b54d0d12d66c863f9058d79dd16e5fdffbf22ee1d5d8c7f6e744b3e86e3e4
build-commands:
- mkdir -p $FLATPAK_DEST/bootstrap-java
- tar xf java-openjdk.tar.bz2 --strip-components=4 --directory=$FLATPAK_DEST/bootstrap-java
- name: java
buildsystem: autotools
no-parallel-make: true
config-opts:
- --with-boot-jdk=/usr/lib/sdk/openjdk/bootstrap-java
- --with-jvm-variants=server
- --with-version-build=12
- --with-version-pre=
- --with-version-opt=
- --with-vendor-version-string=21.9
- --with-vendor-name=Flathub
- --with-vendor-url=https://flathub.org
- --with-vendor-bug-url=https://github.com/flathub/org.freedesktop.Sdk.Extension.openjdk/issues
- --with-debug-level=release
- --with-native-debug-symbols=internal
- --enable-unlimited-crypto
- --with-zlib=system
- --with-libjpeg=system
- --with-giflib=system
- --with-libpng=system
- --with-lcms=system
- --with-harfbuzz=system
- --with-stdc++lib=dynamic
- --with-extra-cxxflags=-grecord-gcc-switches -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection
- --with-extra-cflags=-grecord-gcc-switches -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection
- --with-extra-ldflags=-Wl,-z,relro -Wl,-z,now -Wl,--as-needed
- --disable-javac-server
- --disable-warnings-as-errors
make-args:
- LOG=info
- images
post-install:
- (cd $FLATPAK_DEST/jvm && ln -s openjdk-17.0.1 openjdk-17)
sources:
- type: archive
url: https://github.com/openjdk/jdk17u/archive/refs/tags/jdk-17.0.1+12.tar.gz
sha512: 220d87a29e1a25b670d721c27069b601a48c833069cb252f81ee6de2ff65fef23fd76e689fc755940f7e457b2419ef93a15cbeca64db2a8798028729df876d25
- type: patch
path: 0001-Avoid-requiring-pcsc-development-files-at-runtime.patch
- type: shell
commands:
- chmod a+x configure
- sed -i -e "s|@prefix@|$FLATPAK_DEST|" make/autoconf/spec.gmk.in
- name: cacerts
buildsystem: simple
sources:
- type: file
path: extract_cacerts.sh
build-commands:
- ./extract_cacerts.sh $FLATPAK_DEST/jvm/openjdk-17
- name: ant
buildsystem: simple
cleanup:
- '*.bat'
- '*.cmd'
sources:
- type: file
url: http://archive.apache.org/dist/ant/binaries/apache-ant-1.10.12-bin.tar.gz
dest-filename: apache-ant-bin.tar.gz
sha512: 2287dc5cfc21043c14e5413f9afb1c87c9f266ec2a9ba2d3bf2285446f6e4ccb59b558bf2e5c57911a05dfa293c7d5c7ad60ac9f744ba11406f4e6f9a27b2403
build-commands:
- mkdir -p $FLATPAK_DEST/ant
- tar xf apache-ant-bin.tar.gz --strip-components=1 --directory=$FLATPAK_DEST/ant
- ln -s $FLATPAK_DEST/ant/bin/ant $FLATPAK_DEST/bin
- name: maven
buildsystem: simple
cleanup:
- '*.bat'
- '*.cmd'
sources:
- type: file
url: http://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz
dest-filename: apache-maven-bin.tar.gz
sha512: a9b2d825eacf2e771ed5d6b0e01398589ac1bfa4171f36154d1b5787879605507802f699da6f7cfc80732a5282fd31b28e4cd6052338cbef0fa1358b48a5e3c8
build-commands:
- mkdir -p $FLATPAK_DEST/maven
- tar xf apache-maven-bin.tar.gz --strip-components=1 --exclude=jansi-native --directory=$FLATPAK_DEST/maven
- ln -s $FLATPAK_DEST/maven/bin/mvn $FLATPAK_DEST/maven/bin/mvnDebug $FLATPAK_DEST/bin
- name: gradle
buildsystem: simple
cleanup:
- '*.bat'
sources:
- type: file
url: https://services.gradle.org/distributions/gradle-7.2-bin.zip
dest-filename: gradle-bin.zip
sha256: f581709a9c35e9cb92e16f585d2c4bc99b2b1a5f85d2badbd3dc6bff59e1e6dd
build-commands:
- unzip -q gradle-bin.zip -d $FLATPAK_DEST
- mv $FLATPAK_DEST/gradle-* $FLATPAK_DEST/gradle
- ln -s $FLATPAK_DEST/gradle/bin/gradle $FLATPAK_DEST/bin
- name: scripts
buildsystem: simple
sources:
- type: script
commands:
- mkdir -p /app/jre/bin
- cd /usr/lib/sdk/openjdk/jvm/openjdk-17
- cp -ra conf lib release /app/jre/
- rm /app/jre/lib/src.zip /app/jre/lib/ct.sym
- cp -ra bin/{java,keytool,rmiregistry} /app/jre/bin
dest-filename: install.sh
- type: script
commands:
- mkdir -p /app/jdk/
- cd /usr/lib/sdk/openjdk/jvm/openjdk-17
- cp -ra bin conf include jmods lib release /app/jdk/
dest-filename: installjdk.sh
- type: script
commands:
- export JAVA_HOME=/usr/lib/sdk/openjdk/jvm/openjdk-17
- export PATH=$PATH:/usr/lib/sdk/openjdk/bin
dest-filename: enable.sh
build-commands:
- cp enable.sh install.sh installjdk.sh /usr/lib/sdk/openjdk/
- name: appdata
buildsystem: simple
sources:
- type: file
path: org.freedesktop.Sdk.Extension.openjdk.appdata.xml
build-commands:
- mkdir -p ${FLATPAK_DEST}/share/metainfo
- cp org.freedesktop.Sdk.Extension.openjdk.appdata.xml ${FLATPAK_DEST}/share/metainfo
- appstream-compose --basename=org.freedesktop.Sdk.Extension.openjdk --prefix=${FLATPAK_DEST} --origin=flatpak org.freedesktop.Sdk.Extension.openjdk