move patchelf into prepare function, pur bianry into /usr/bin/, cleanup
This commit is contained in:
parent
b541ca5137
commit
43b7f1f20a
1 changed files with 27 additions and 22 deletions
51
PKGBUILD
51
PKGBUILD
|
@ -11,34 +11,39 @@ makedepends=('patchelf')
|
||||||
provides=('cemu')
|
provides=('cemu')
|
||||||
conflicts=('cemu' 'cemu-git')
|
conflicts=('cemu' 'cemu-git')
|
||||||
options=(!strip !docs libtool emptydirs)
|
options=(!strip !docs libtool emptydirs)
|
||||||
source=("https://github.com/cemu-project/Cemu/releases/download/v${pkgver%.*}-${pkgver##*.}/cemu-${pkgver%.*}-${pkgver##*.}-ubuntu-20.04-x64.zip"
|
source=(
|
||||||
"cemu.desktop::https://raw.githubusercontent.com/cemu-project/Cemu/main/dist/linux/info.cemu.Cemu.desktop"
|
"https://github.com/cemu-project/Cemu/releases/download/v${pkgver%.*}-${pkgver##*.}/cemu-${pkgver%.*}-${pkgver##*.}-ubuntu-20.04-x64.zip"
|
||||||
"cemu.png::https://github.com/cemu-project/Cemu/raw/main/dist/linux/info.cemu.Cemu.png"
|
"cemu.desktop::https://raw.githubusercontent.com/cemu-project/Cemu/main/dist/linux/info.cemu.Cemu.desktop"
|
||||||
|
"cemu.png::https://github.com/cemu-project/Cemu/raw/main/dist/linux/info.cemu.Cemu.png"
|
||||||
)
|
)
|
||||||
sha256sums=('c1f4c7438752c876bb6cadaf74bee1c783edad41ebd2402bed2c0fb046240bb6'
|
sha256sums=('c1f4c7438752c876bb6cadaf74bee1c783edad41ebd2402bed2c0fb046240bb6'
|
||||||
'3e9380eb47646fede56c0de59ddab872627c00629820ef5f974be0d07e4f3490'
|
'3e9380eb47646fede56c0de59ddab872627c00629820ef5f974be0d07e4f3490'
|
||||||
'6458a99b8bd54e44857efa0f82bfd6035e7e072e7e080e3330e4e2cfe89cbd33')
|
'6458a99b8bd54e44857efa0f82bfd6035e7e072e7e080e3330e4e2cfe89cbd33')
|
||||||
|
|
||||||
package() {
|
prepare() {
|
||||||
CEMU_BIN_PATH="$srcdir/Cemu_${pkgver%.*}-${pkgver##*.}/Cemu"
|
_pkgbase=${pkgname%%-*} && _pkgbase=${_pkgbase^}
|
||||||
|
cd $srcdir/${_pkgbase}_${pkgver%.*}-${pkgver##*.}
|
||||||
|
|
||||||
# Patch
|
_libs=('libpcre.so.3' 'libffi.so.7' 'libicuuc.so.71' 'libicui18n.so.71' 'libicudata.so.71')
|
||||||
patchelf --replace-needed libpcre.so.3 libpcre.so $CEMU_BIN_PATH
|
for lib in ${_libs[@]}
|
||||||
patchelf --replace-needed libffi.so.7 libffi.so $CEMU_BIN_PATH
|
do
|
||||||
|
patchelf --replace-needed $lib ${lib%.*} ./$_pkgbase
|
||||||
|
done
|
||||||
|
|
||||||
patchelf --replace-needed libicuuc.so.71 libicuuc.so $CEMU_BIN_PATH
|
patchelf --remove-needed libsepol.so.1 ./$_pkgbase
|
||||||
patchelf --replace-needed libicui18n.so.71 libicui18n.so $CEMU_BIN_PATH
|
patchelf --remove-needed libselinux.so.1 ./$_pkgbase
|
||||||
patchelf --replace-needed libicudata.so.71 libicudata.so $CEMU_BIN_PATH
|
}
|
||||||
|
|
||||||
patchelf --remove-needed libsepol.so.1 $CEMU_BIN_PATH
|
package() {
|
||||||
patchelf --remove-needed libselinux.so.1 $CEMU_BIN_PATH
|
_pkgbase=${pkgname%%-*}
|
||||||
|
cd $srcdir/${_pkgbase^}_${pkgver%.*}-${pkgver##*.}
|
||||||
# Chmod
|
|
||||||
chmod +x $CEMU_BIN_PATH
|
install -Dm 755 ${_pkgbase^} $pkgdir/usr/bin/$_pkgbase
|
||||||
|
|
||||||
mkdir -p "$pkgdir/usr/share/cemu"
|
install -d $pkgdir/usr/share/$_pkgbase
|
||||||
cp -r "$srcdir/Cemu_${pkgver%.*}-${pkgver##*.}"/* "$pkgdir/usr/share/cemu"
|
cp -r ./{gameProfiles,resources,shaderCache} $pkgdir/usr/share/$_pkgbase
|
||||||
|
|
||||||
install -Dm644 -t "$pkgdir"/usr/share/applications cemu.desktop
|
sed -i -e '/^Icon=/cIcon=cemu' -e '/^Exec=Cemu/cExec=cemu' $srcdir/$_pkgbase.desktop
|
||||||
install -Dm644 -t "$pkgdir"/usr/share/icons/hicolor/128x128/apps cemu.png
|
install -Dm 644 -t $pkgdir/usr/share/applications $srcdir/$_pkgbase.desktop
|
||||||
|
install -Dm 644 -t $pkgdir/usr/share/icons/hicolor/128x128/apps $srcdir/$_pkgbase.png
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue