-
Notifications
You must be signed in to change notification settings - Fork 9
/
PKGBUILD
46 lines (40 loc) · 1.44 KB
/
PKGBUILD
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
# Maintainer: Timofey Titovets <nefelim4ag@gmail.com>
# Old maintainer: John Reese <john@noswap.com>
# Upstream URL: https://github.com/atom/atom
pkgname=atom-editor-git
pkgver=0.184.0.r70.ga3f64dd
pkgrel=1
pkgdesc="Chrome-based text editor from Github"
arch=('any')
url="https://github.com/atom/atom"
license=('MIT')
provides=('atom-editor')
conflicts=('atom-editor')
depends=('alsa-lib' 'gconf' 'gtk2' 'libgnome-keyring' 'libnotify' 'libxtst' 'nodejs' 'nss' 'python2')
makedepends=('git')
source=("atom::git+git://github.com/atom/atom")
md5sums=('SKIP')
pkgver() {
cd "$srcdir/atom"
git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g;s/v//'
}
prepare() {
cd "$srcdir/atom"
cp resources/linux/atom.desktop.in resources/linux/atom.desktop
sed -i -e "s|<%= iconName %>|atom|" resources/linux/atom.desktop
sed -i -e "s|<%= executable %>|atom|" resources/linux/atom.desktop
sed -i -e "s|<%= description %>|$pkgdesc|" resources/linux/atom.desktop
}
build() {
cd "$srcdir/atom"
[ -d ".git" ] && rm -rf .git
export PYTHON=python2
script/build --build-dir "$srcdir/atom-build"
}
package() {
cd "$srcdir/atom"
script/grunt install --build-dir "$srcdir/atom-build" --install-dir "$pkgdir/usr"
install -Dm644 resources/linux/atom.desktop "$pkgdir/usr/share/applications/atom.desktop"
install -Dm644 resources/atom.png "$pkgdir/usr/share/pixmaps/atom.png"
install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
}