Gen raw platform/sdk

dev
Marko Semet 2018-12-01 02:47:15 +01:00
parent 3cfa9a602a
commit 845e1386f2
12 changed files with 80 additions and 80 deletions

View File

@ -1,21 +0,0 @@
build-runtime: true
writable-sdk: true
id: de.marko10_000.winebarrels.RawPlatform
branch: wb-raw-uno
sdk: org.gnome.Platform
runtime: org.gnome.Platform
runtime-version: 3.30
add-extensions:
org.freedesktop.Platform.Compat.i386:
directory: lib/i386
remove-after-build: false
bundle: false
version: 18.08
modules:
- tools/is-x86_64.yaml
- tools/add-libs.yaml

View File

@ -0,0 +1,14 @@
build-runtime: true
writable-sdk: true
id: de.marko10_000.winebarrels.RawPlatform
branch: wb-raw-uno
sdk: org.gnome.Platform
runtime: org.gnome.Platform
runtime-version: 3.30
modules:
- ../tools/is-any-x86.yaml
- add-libs.yaml

View File

@ -0,0 +1,14 @@
build-runtime: true
writable-sdk: true
id: de.marko10_000.winebarrels.RawSdk
branch: wb-raw-uno
sdk: org.gnome.Sdk
runtime: org.gnome.Sdk
runtime-version: 3.30
modules:
- ../tools/is-any-x86.yaml
- add-libs.yaml

View File

@ -0,0 +1,17 @@
name: addLibs
sources:
- type: archive
path: libs.tar.gz
buildsystem: simple
build-commands:
- mv lib lib32bit
- cp -ra lib32bit /usr
- echo /usr/lib32bit/ >> /etc/ld.so.conf
- echo /usr/lib32bit/i386-linux-gnu >> /etc/ld.so.conf
cleanup:
- /lib32bit/i386-linux-gnu/ruby
- "/lib32bit/python*"
- /lib32bit/locale
- "/lib32bit/perl*"
only-arches:
- x86_64

View File

@ -0,0 +1,22 @@
#!/usr/bin/env python3
import os
import shutil
import subprocess
import tempfile
import sys
def getLibs(name, branch, arch):
buildDir = tempfile.gettempdir() + "/" + "".join(map(lambda x: hex(x)[2:], os.urandom(32)))
print("Build dir to get libs: " + buildDir)
try:
subprocess.check_call(["flatpak", "build-init", "--arch=" + arch, buildDir, "tmp.tmp.Tmp", name, name, branch])
subprocess.check_call(["sh", "-c", "flatpak build " + repr(buildDir) + " tar -caz /usr/lib > libs.tar.gz"])
finally:
shutil.rmtree(buildDir)
if __name__ == '__main__':
getLibs(sys.argv[1], sys.argv[2], "i386")

View File

@ -0,0 +1,6 @@
#!/bin/sh
flatpak install --user flathub org.gnome.Platform/i386/3.30 && flatpak update --user org.gnome.Platform/i386/3.30
sh -c "cd `dirname $0`; ./genLibs.py org.gnome.Platform 3.30"
flatpak-builder --user --install-deps-from=flathub build `dirname $0`/RawPlatform.yaml
rm `dirname $0`/libs.tar.gz

View File

@ -0,0 +1,6 @@
#!/bin/sh
flatpak install --user flathub org.gnome.Sdk/i386/3.30 && flatpak update --user org.gnome.Sdk/i386/3.30
sh -c "cd `dirname $0`; ./genLibs.py org.gnome.Sdk 3.30"
flatpak-builder --user --install-deps-from=flathub build `dirname $0`/RawPlatform.yaml
rm `dirname $0`/libs.tar.gz

View File

@ -1,22 +0,0 @@
build-runtime: true
writable-sdk: true
id: de.marko10_000.winebarrels.RawSdk
id-platform: de.marko10_000.winebarrels.RawPlatform
branch: wb-raw-uno
sdk: org.gnome.Sdk
runtime: org.gnome.Sdk
runtime-version: 3.30
add-extensions:
org.freedesktop.Platform.Compat.i386:
directory: lib/i386
remove-after-build: false
bundle: false
version: 18.08
modules:
- tools/is-x86_64.yaml
- tools/add-libs.yaml

View File

@ -1,9 +0,0 @@
name: addLibs
buildsystem: simple
build-commands:
- mkdir /usr/lib/i386
- mkdir /usr/lib/gl_i386
- echo /usr/lib/i386 >> /etc/ld.so.conf
- echo /usr/lib/gl-i386 >> /etc/ld.so.conf
only-arches:
- x86_64

View File

@ -3,4 +3,5 @@ buildsystem: simple
build-commands:
- false
skip-arches:
- i386
- x86_64

View File

@ -1,20 +0,0 @@
#!/usr/bin/env python3
import os
import sys
import re
_match = re.compile("^(?P<path>.*/[^.]*)\\.[0-9]*\\.so$")
def link_when_match(path):
tmp = _match.match(path)
if tmp:
tmp = tmp.groupdict()
os.symlink(path, tmp["path"] + ".so")
print("Link: " + tmp["path"] + ".so")
if __name__ == '__main__':
for i in os.listdir(sys.argv[1]):
link_when_match(os.path.join(sys.argv[1], i))

View File

@ -1,8 +0,0 @@
name: ld-update
sources:
- type: file
path: ld-links.py
buildsystem: simple
build-commands:
- ls -la /usr/lib/i386
- ./ld-links.py /usr/lib/i386