diff --git a/build.gradle b/build.gradle index e2e07d632b8..4270b7ea072 100644 --- a/build.gradle +++ b/build.gradle @@ -594,8 +594,14 @@ jlink { installerOptions = [ '--vendor', 'JabRef', '--app-version', "${project.version}", - //'--temp', "$buildDir/installer", - '--resource-dir', "${projectDir}/buildres/linux" + // '--temp', "$buildDir/installer", + '--resource-dir', "${projectDir}/buildres/linux", + '--linux-menu-group', 'Office;', + '--linux-rpm-license-type', 'MIT', + // '--license-file', "${projectDir}/LICENSE.md", + '--file-associations', "${projectDir}/buildres/linux/desktop.properties", + '--description', 'JabRef is an open source bibliography reference manager. The native file format used by JabRef is BibTeX, the standard LaTeX bibliography format.', + '--linux-shortcut' ] } diff --git a/buildres/linux/JabRef.png b/buildres/linux/JabRef.png new file mode 100644 index 00000000000..e807e0448d3 Binary files /dev/null and b/buildres/linux/JabRef.png differ diff --git a/buildres/linux/copyright b/buildres/linux/copyright new file mode 100644 index 00000000000..5e06048e6f0 --- /dev/null +++ b/buildres/linux/copyright @@ -0,0 +1,5 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ + +Files: * +Copyright: APPLICATION_COPYRIGHT +License: APPLICATION_LICENSE_TEXT \ No newline at end of file diff --git a/buildres/linux/desktop.properties b/buildres/linux/desktop.properties new file mode 100644 index 00000000000..a7798f073f5 --- /dev/null +++ b/buildres/linux/desktop.properties @@ -0,0 +1 @@ +mime-type=text/x-bibtex; \ No newline at end of file diff --git a/buildres/linux/jabref-JabRef.desktop b/buildres/linux/jabref-JabRef.desktop new file mode 100644 index 00000000000..47b3b7c5105 --- /dev/null +++ b/buildres/linux/jabref-JabRef.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=APPLICATION_NAME +GenericName=BibTeX Editor +Comment=APPLICATION_DESCRIPTION +Exec=APPLICATION_LAUNCHER +Icon=APPLICATION_ICON +Terminal=false +Type=Application +Categories=DEPLOY_BUNDLE_CATEGORY +Keywords=bibtex;biblatex;latex;bibliography +StartupWMClass=org-jabref-JabRefMain \ No newline at end of file diff --git a/buildres/linux/postinst b/buildres/linux/postinst index 5fc0de1ee5d..40791c02384 100644 --- a/buildres/linux/postinst +++ b/buildres/linux/postinst @@ -20,9 +20,8 @@ set -e case "$1" in configure) INSTALL_PATH="/usr/lib/mozilla/native-messaging-hosts/" - mkdir -p $INSTALL_PATH - \cp /opt/jabref/lib/org.jabref.jabref.json $INSTALL_PATH - chmod a+x "/opt/jabref/lib/jabrefHost.py" + install -D -m0755 /opt/jabref/lib/org.jabref.jabref.json $INSTALL_PATH + DESKTOP_COMMANDS_INSTALL ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/buildres/linux/prerm b/buildres/linux/prerm new file mode 100644 index 00000000000..1c6f04c7db5 --- /dev/null +++ b/buildres/linux/prerm @@ -0,0 +1,32 @@ +#!/bin/sh +# postrm script for APPLICATION_PACKAGE +# +# see: dh_installdeb(1) +set -e + +# summary of how this script can be called: +# * `remove' +# * `purge' +# * `upgrade' +# * `failed-upgrade' +# * `abort-install' +# * `abort-install' +# * `abort-upgrade' +# * `disappear' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + INSTALL_PATH="/usr/lib/mozilla/native-messaging-hosts/" + if grep --quiet '"path": "/opt' /usr/lib/mozilla/native-messaging-hosts/org.jabref.jabref.json; then + rm -D -m0755 /opt/jabref/lib/org.jabref.jabref.json $INSTALL_PATH + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +exit 0 \ No newline at end of file