# Maintainer: maniacata # Contributor: Marcin Wieczorek # Contributor: Martin Thierer # Contributor: Amy Wilson # Contributor: Simon Doppler # Contributor: Agustin Borgna # Contributor: Marcel Korpel # Contributor: Renan Birck pkgname=logisim-evolution pkgver=3.4.1 pkgrel=2 pkgdesc='An educational tool for designing and simulating digital logic circuits (build from source)' arch=('any') url="https://github.com/reds-heig/logisim-evolution" license=('GPL3') depends=('java-runtime>=9' 'hicolor-icon-theme') makedepends=('java-environment>=9') source=("${pkgname}-${pkgver}.tar.gz::https://github.com/reds-heig/logisim-evolution/archive/v${pkgver}.tar.gz") sha256sums=('bce8ee163e80b56a49a4ec3b5fa10c2b21779146f4c2c44d4bc7560a72566236') install=$pkgname.install build() { cd "${srcdir}/${pkgname}-${pkgver}" ./gradlew shadowJar } package() { cd "${srcdir}/${pkgname}-${pkgver}" install -Dm644 "build/libs/logisim-evolution-${pkgver}-all.jar" \ "${pkgdir}/usr/share/java/${pkgname}/${pkgname}.jar" install -Dm644 "support/Flatpak/com.github.reds.LogisimEvolution.xml" \ "${pkgdir}/usr/share/mime/packages/${pkgname}.xml" install -Dm644 "support/Flatpak/com.github.reds.LogisimEvolution.desktop" \ "${pkgdir}/usr/share/applications/${pkgname}.desktop" for SIZE in 16 20 24 48 64 128; do install -Dm644 \ "src/main/resources/resources/logisim/img/logisim-icon-${SIZE}.png" \ "${pkgdir}/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/${pkgname}.png" done install -Dm644 "build/resources/main/resources/logisim/img/logisim-icon.svg" \ "${pkgdir}/usr/share/icons/hicolor/scalable/apps/${pkgname}.svg" install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}" sed -e 's|Exec=.*|Exec=/usr/bin/logisim-evolution|' \ -e 's|com.github.reds.LogisimEvolution|logisim-evolution|' \ -i "${pkgdir}/usr/share/applications/${pkgname}.desktop" }