Arch and Deb

This commit is contained in:
Beat Jäckle 2023-08-28 10:46:54 +02:00
parent 1c4bd5f0ae
commit b5cd22ea70
8 changed files with 376 additions and 0 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*/pkg
*/src
*/*_64

60
arch-pkg/PKGBUILD Normal file
View file

@ -0,0 +1,60 @@
# Maintainer: Beat Jäckle <beat@git.jdmweb2.ch>
pkgname=tigerjython
pkgver=2.37
pkgrel=3
pkgdesc='TigerJython IDE'
arch=(x86_64)
url='https://www.tigerjython.ch/'
license=('custom')
depends=(
'jre-openjdk>=2'
)
makedepends=('tar' 'gzip')
# https://pixabay.com/de/vectors/fu%C3%9Fabdruck-tier-pelzig-pfote-308794/
source=("https://www.tigerjython.ch/user/pages/download/TigerJython.tar.gz" 'http://jython.tobiaskohn.ch/images/TigerJython_Logo.png')
b2sums=('32181780c1b1a86e7e151e01cf0428726f3c7ccd8c27db9d64cac4b03c1b8a0ae8e32fb029e9d32d3d1baf196f6874418d6a394e8b503bc454fdc367bbf2f01e'
'4ae37420b11b7dd5e7ceb9c00fb48c6f575d6658b0cb0963e38155e79af5ba0cfaf1d00da8c278a6dcf5ae6615bf86b298dabca3c827fb7c80d1c55302a58dc7')
_install_path=/opt
prepare() {
rm -fr "$pkgname-$pkgver"
mv TigerJython/bin "$pkgname-$pkgver"
mv TigerJython/Readme.txt "$pkgname-$pkgver"
rm -r TigerJython
cd "$pkgname-$pkgver"
rm -r ./jre
find -name ._\* -delete
find -name .DS_Store -delete
}
build() {
echo "#!/bin/sh" > "${srcdir}/tigerjython"
echo "set -ue" >> "${srcdir}/tigerjython"
echo "java -jar ${_install_path}/${pkgname}/tigerjython2.jar" >> "${srcdir}/tigerjython"
_desktopfile_path="${srcdir}/tigerjython.desktop"
echo "[Desktop Entry]" > ${_desktopfile_path}
echo "Name=${pkgdesc}" >> ${_desktopfile_path}
echo "Exec=java -jar ${_install_path}/${pkgname}/tigerjython2.jar" >> ${_desktopfile_path}
echo "Icon=tigerjython" >> ${_desktopfile_path}
echo "Type=Application" >> ${_desktopfile_path}
echo "Categories=Education;Science;Math;" >> ${_desktopfile_path}
echo "Keywords=science;math;matrix;plotting;" >> ${_desktopfile_path}
}
package() {
install -Ddm755 "${pkgdir}/${_install_path}/${pkgname}/Lib"
install -Ddm755 "${pkgdir}/${_install_path}/${pkgname}/TestSamples"
install -Dm644 "${srcdir}/$pkgname-$pkgver/tigerjython2"* "${pkgdir}/${_install_path}/${pkgname}/."
install -Dm644 "${srcdir}/$pkgname-$pkgver/Lib/"* "${pkgdir}/${_install_path}/${pkgname}/Lib/."
install -Dm644 "${srcdir}/$pkgname-$pkgver/TestSamples/"* "${pkgdir}/${_install_path}/${pkgname}/TestSamples/."
install -Dm755 "${srcdir}/tigerjython" "${pkgdir}/usr/bin/tigerjython"
install -Dm755 "${srcdir}/tigerjython.desktop" "${pkgdir}/usr/share/applications/tigerjython.desktop"
install -Dm755 "${srcdir}/../tigerjython.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/tigerjython.svg"
}

Binary file not shown.

110
arch-pkg/tigerjython.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 76 KiB

60
debian-deb/PKGBUILD Normal file
View file

@ -0,0 +1,60 @@
# Maintainer: Beat Jäckle <beat@git.jdmweb2.ch>
pkgname=tigerjython
pkgver=2.37
pkgrel=3
pkgdesc='TigerJython IDE'
arch=(x86_64)
url='https://www.tigerjython.ch/'
license=('custom')
depends=(
'jre-openjdk>=2'
)
makedepends=('tar' 'gzip')
# https://pixabay.com/de/vectors/fu%C3%9Fabdruck-tier-pelzig-pfote-308794/
source=("https://www.tigerjython.ch/user/pages/download/TigerJython.tar.gz" 'http://jython.tobiaskohn.ch/images/TigerJython_Logo.png')
b2sums=('32181780c1b1a86e7e151e01cf0428726f3c7ccd8c27db9d64cac4b03c1b8a0ae8e32fb029e9d32d3d1baf196f6874418d6a394e8b503bc454fdc367bbf2f01e'
'4ae37420b11b7dd5e7ceb9c00fb48c6f575d6658b0cb0963e38155e79af5ba0cfaf1d00da8c278a6dcf5ae6615bf86b298dabca3c827fb7c80d1c55302a58dc7')
_install_path=/opt
prepare() {
rm -fr "$pkgname-$pkgver"
mv TigerJython/bin "$pkgname-$pkgver"
mv TigerJython/Readme.txt "$pkgname-$pkgver"
rm -r TigerJython
cd "$pkgname-$pkgver"
rm -r ./jre
find -name ._\* -delete
find -name .DS_Store -delete
}
build() {
echo "#!/bin/sh" > "${srcdir}/tigerjython"
echo "set -ue" >> "${srcdir}/tigerjython"
echo "java -jar ${_install_path}/${pkgname}/tigerjython2.jar" >> "${srcdir}/tigerjython"
_desktopfile_path="${srcdir}/tigerjython.desktop"
echo "[Desktop Entry]" > ${_desktopfile_path}
echo "Name=${pkgdesc}" >> ${_desktopfile_path}
echo "Exec=java -jar ${_install_path}/${pkgname}/tigerjython2.jar" >> ${_desktopfile_path}
echo "Icon=tigerjython" >> ${_desktopfile_path}
echo "Type=Application" >> ${_desktopfile_path}
echo "Categories=Education;Science;Math;" >> ${_desktopfile_path}
echo "Keywords=science;math;matrix;plotting;" >> ${_desktopfile_path}
}
package() {
install -Ddm755 "${pkgdir}/${_install_path}/${pkgname}/Lib"
install -Ddm755 "${pkgdir}/${_install_path}/${pkgname}/TestSamples"
install -Dm644 "${srcdir}/$pkgname-$pkgver/tigerjython2"* "${pkgdir}/${_install_path}/${pkgname}/."
install -Dm644 "${srcdir}/$pkgname-$pkgver/Lib/"* "${pkgdir}/${_install_path}/${pkgname}/Lib/."
install -Dm644 "${srcdir}/$pkgname-$pkgver/TestSamples/"* "${pkgdir}/${_install_path}/${pkgname}/TestSamples/."
install -Dm755 "${srcdir}/tigerjython" "${pkgdir}/usr/bin/tigerjython"
install -Dm755 "${srcdir}/tigerjython.desktop" "${pkgdir}/usr/share/applications/tigerjython.desktop"
install -Dm755 "${srcdir}/../tigerjython.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/tigerjython.svg"
}

33
debian-deb/makedeb.sh Normal file
View file

@ -0,0 +1,33 @@
#!/bin/bash
set -ue
# Src:
# https://earthly.dev/blog/creating-and-hosting-your-own-deb-packages-and-apt-repo/
. PKGBUILD
srcdir="${PWD}/src"
pkgdir="${PWD}/${pkgname}_${pkgver}-${pkgrel}_${arch}"
rootdir="${PWD}"
mkdir -p "${srcdir}"
cd "${srcdir}"
wget -c https://www.tigerjython.ch/user/pages/download/TigerJython.tar.gz
# if ! [ -f TigerJython.tar.gz ];then wget https://www.tigerjython.ch/user/pages/download/TigerJython.tar.gz;fi
tar -xf TigerJython.tar.gz
prepare
build
mkdir -p "${pkgdir}"
cd "${pkgdir}"
package
mkdir -p ${pkgdir}/DEBIAN
echo "Package: ${pkgname}
Version: ${pkgver}
Maintainer: Beat Jäckle <beat@git.jdmweb2.ch>
Depends: default-jre
Architecture: amd64
Homepage: ${url}
Description: ${pkgdesc}" \
> ${pkgdir}/DEBIAN/control
fakeroot dpkg --build ${pkgdir}

110
debian-deb/tigerjython.svg Normal file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.