summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: a9a4c4549358a67588f820f2c346a14897788f6d (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
# Maintainer: Fredy GarcĂ­a <frealgagu at gmail dot com>

pkgname=flutter-git
pkgver=1.4.19.r2.27b058a414
pkgrel=1
pkgdesc="A new mobile app SDK to help developers and designers build modern mobile apps for iOS and Android."
arch=("x86_64")
url="https://${pkgname%-git}.io"
license=("custom" "BSD" "CCPL")
depends=("glu" "java-environment" "lib32-libglvnd")
optdepends=(
  "android-sdk"
  "android-studio"
  "bash"
  "dart"
  "git"
  "intellij-idea-community-edition"
  "intellij-idea-ultimate-edition"
  "perl"
  "python"
  "sh"
)
makedepends=("git" "python" "unzip")
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
backup=("opt/${pkgname%-git}/packages/${pkgname%-git}_test/pubspec.yaml" "opt/${pkgname%-git}/packages/${pkgname%-git}/pubspec.yaml")
options=("!emptydirs")
install="${pkgname%-git}.install"
source=(
  "${pkgname%-git}::git+https://github.com/${pkgname%-git}/${pkgname%-git}"
  "${pkgname%-git}.sh"
  "${pkgname%-git}.csh"
)
sha256sums=(
  "SKIP"
  "1dea1952d386c43948b9970382c2da5b65b7870684b8ad2ad89124e873aa485a"
  "7ef10d753cfaac52d243549764a793f44f8284a1f4b11715ccd2fa915b026a6f"
)

pkgver() {
  cd "${srcdir}/${pkgname%-git}"
  (
    set -o pipefail
    git describe --long --tags 2> /dev/null | sed "s/^[A-Za-z\.\-]*//;s/\([^-]*-\)g/r\1/;s/-/./g" || 
    printf "r%s.%s\n" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" 
  )
}

build() {
  cd "${srcdir}/${pkgname%-git}"
  "${srcdir}/${pkgname%-git}/bin/${pkgname%-git}" doctor
}

package() {
  install -Dm644 "${srcdir}/${pkgname%-git}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm755 "${srcdir}/${pkgname%-git}.sh" "${pkgdir}/etc/profile.d/${pkgname%-git}.sh"
  install -Dm755 "${srcdir}/${pkgname%-git}.csh" "${pkgdir}/etc/profile.d/${pkgname%-git}.csh"
  install -dm755 "${pkgdir}/opt/${pkgname%-git}"
  install -dm755 "${pkgdir}/usr/bin"
  cp -ra "${srcdir}/${pkgname%-git}" "${pkgdir}/opt/"
  find "${pkgdir}/opt/${pkgname%-git}" -type d -exec chmod a+rx {} +
  find "${pkgdir}/opt/${pkgname%-git}" -type f -exec chmod a+r {} +
  chmod a+rw "${pkgdir}/opt/${pkgname%-git}/bin/cache/lockfile" "${pkgdir}/opt/${pkgname%-git}/version"
  ln -s "/opt/${pkgname%-git}/bin/${pkgname%-git}" "${pkgdir}/usr/bin/${pkgname%-git}"
}