summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a22f6c7d267a4260ceaff35adf0ba4cadc198c58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Maintainer: Johannes Graƫn <johannes SPIRALGALAXY selfnet FULLSTOP de>

# This PKGBUILD is based on the packages jabref and jabref-git

pkgname=jabref-latest
pkgver=20190830
pkgrel=1
pkgdesc="GUI frontend for BibTeX, written in Java; latest master version from git"
arch=('any')
url="https://www.jabref.org/"
license=('MIT')
provides=('jabref')
conflicts=('jabref')
depends=('archlinux-java-run>=4'
         'java11-openjfx'
         'sh'
         'atk'
         'bzip2'
         'cairo'
         'expat'
         'fontconfig'
         'freetype2'
         'fribidi'
         'gcc-libs'
         'gdk-pixbuf2'
         'glib2'
         'glibc'
         'graphite'
         'gtk2'
         'harfbuzz'
         'libdatrie'
         'libffi'
         'libpng'
         'libthai'
         'libutil-linux'
         'libx11'
         'libxau'
         'libxcb'
         'libxcomposite'
         'libxcursor'
         'libxdamage'
         'libxdmcp'
         'libxext'
         'libxfixes'
         'libxi'
         'libxinerama'
         'libxrandr'
         'libxrender'
         'libxtst'
         'pango'
         'pcre'
         'pixman'
         'zlib'
)
optdepends=('gsettings-desktop-schemas: For web search support')
source=(https://builds.jabref.org/master/JabRef--master--latest.jar
        https://raw.githubusercontent.com/JabRef/jabref/master/LICENSE.md
        jabref.sh
        jabref.desktop)
noextract=(JabRef--master--latest.jar)
sha256sums=('SKIP'
            'dad0a06f54ce346cc066c6e27e746974e850b77f04381f3c363021ee927e444d'
            '5f75629a9d8984ffd93b2628f1c064fa4f72df4677cfce91977132240d7a3179'
            'a26845ba60ef2588c52d7d18259a977b146c777f935573bacdffcdcefa2b41b5')


pkgver() {
  curl --silent --head head https://builds.jabref.org/master/JabRef--master--latest.jar \
  | grep "Last-Modified" | cut -d' ' -f2- | date -f - +%Y%m%d
}

prepare() {
  cd ${srcdir}
  bsdtar -xf JabRef--master--latest.jar icons/jabref.svg
}

package() {
  cd ${srcdir}
  install -Dm755 JabRef--master--latest.jar ${pkgdir}/usr/share/java/${pkgname}/JabRef-${pkgver}.jar

  install -Dm755 jabref.sh ${pkgdir}/usr/bin/jabref
  sed -i "s/VERSION/${pkgver}/" ${pkgdir}/usr/bin/jabref

  install -Dm644 jabref.desktop ${pkgdir}/usr/share/applications/${pkgname}.desktop
  install -Dm644 icons/jabref.svg ${pkgdir}/usr/share/pixmaps/${pkgname}.svg
  install -Dm644 LICENSE.md ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md
}