Last active
March 3, 2021 19:05
-
-
Save jitingcn/f3a0a38f616c86991a83496da0f50b3e to your computer and use it in GitHub Desktop.
ImageJ with Java 11 package script [Arch Linux][AUR]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Jiting <[email protected]> | |
# Contributor: Felix Golatofski <[email protected]> | |
# Contributor: Butui Hu <[email protected]> | |
# Contributor: Sebastiaan Lokhorst <[email protected]> | |
pkgname=imagej-git | |
pkgver=r9160.19f0d69f4 | |
pkgrel=2 | |
_name=imagej | |
_title=ImageJ | |
pkgdesc='Open scientific N-dimensional image processing' | |
arch=('x86_64') | |
url='https://github.com/imagej/imagej' | |
license=('BSD') | |
depends=( | |
'glibc' | |
'java-runtime=11' | |
) | |
makedepends=( | |
'git' | |
'gendesk' | |
'xorg-server-xvfb' | |
'java-environment=11' | |
'maven' | |
) | |
conflicts=("${_name}" 'imagej2') | |
provides=("${_name}=${pkgver}") | |
source=("${_name}::git+https://github.com/imagej/imagej.git" | |
"https://maven.scijava.org/content/repositories/releases/net/imagej/imagej-launcher/6.0.1/imagej-launcher-6.0.1.jar") | |
sha256sums=('SKIP' | |
'8fff3ac0c151263e07c58bb65729c7ea1ea85c86844aa7876282434a8ec5560b') | |
prepare() { | |
echo 'Creating desktop file' | |
gendesk -f -n --pkgname ${_title} \ | |
--pkgdesc "${pkgdesc}" \ | |
--categories 'Graphics;Science;Biology;' \ | |
--icon "${_name}" \ | |
--exec "${_name} %f" | |
} | |
build() { | |
mkdir -p "${srcdir}/${_name}/target" | |
cp "imagej-launcher-6.0.1.jar" "${srcdir}/${_name}/target/" | |
cp ${srcdir}/${_name}/logo/imagej2-v1/* "${srcdir}/${_name}/logo" -rf | |
cd "${srcdir}/${_name}" | |
export PATH=/usr/lib/jvm/java-11-openjdk/jre/bin/:$PATH | |
xvfb-run -d mvn -Papp -Ppopulate-app | |
} | |
package() { | |
install -d "${pkgdir}/opt" "${pkgdir}/usr/bin" "${pkgdir}/usr/share/pixmaps" | |
cp -r "${srcdir}/${_name}/ImageJ.app" "${pkgdir}/opt/${_name}" | |
rm -rfv "${pkgdir}/opt/${_name}/Contents" "${pkgdir}/opt/${_name}/*.exe" | |
ln -s "/opt/${_name}/ImageJ-linux64" "${pkgdir}/usr/bin/${_name}" | |
install -Dm644 "${srcdir}/${_name}/logo/imagej.png" "${pkgdir}/usr/share/pixmaps/${_name}.png" | |
install -Dm644 "${srcdir}/${_title}.desktop" "${pkgdir}/usr/share/applications/${_title}.desktop" | |
install -Dm644 "${srcdir}/${_name}/LICENSE.txt" -t "${pkgdir}/usr/share/licenses/${_name}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't have a good solution to solve
plugins
folder permission issue.Currently I just do
sudo chmod 777 /opt/imagej/plugins
on my machine。