summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 872556d92bec7f1e869ca391c12b7ff4f0f3e17c (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
# Maintainer: Caltlgin Stsodaat <contact@fossdaily.xyz>
# Contributor: Felix Golatofski <contact@xdfr.de>
# Contributor: Manuel Hüsers <manuel.huesers@uni-ol.de>
# Contributor: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: Det <nimetonmaili@gmail.com>
# Contributor: Godane aka Christopher Rogers <slaxemulator@gmail.com>
# Contributor: Michai Coman <mihai@m1x.ro>

pkgname='unetbootin'
pkgver=700
pkgrel=1
pkgdesc='Create bootable Live USB drives'
arch=('x86_64')
url='https://unetbootin.github.io'
_url_source='https://github.com/unetbootin/unetbootin'
license=('GPL3')
depends=('hicolor-icon-theme' 'mtools' 'p7zip' 'qt5-base' 'syslinux')
makedepends=('qt5-tools' 'setconf')
optdepends=('polkit: run unetbootin directly from menu')
source=("${pkgname}-${pkgver}::${_url_source}/archive/${pkgver}.tar.gz"
        "${pkgname}.sh"
				"org.archlinux.pkexec.${pkgname}.policy")
sha256sums=('709f1ccc9f72c664d85fbaccce38c17cb8861261e2447f2000d0d753f5ffcbd0'
            '6b99405a78ac4de80e3a20e766ce993f22c8a01e4ab50f952a10bdcc26effd3f'
            '118f154e2772ff0d50d22735418fb37c9a03ecd0a1bbf2c8a4a8ed48da64160c')

prepare() {
  cd "${pkgname}-${pkgver}/src/${pkgname}"
  setconf "${pkgname}.desktop" 'Exec' "/usr/bin/${pkgname}"
	sed -i '/^RESOURCES/d' "${pkgname}.pro"
}

build() {
  cd "${pkgname}-${pkgver}/src/${pkgname}"
  lupdate-qt5 "${pkgname}.pro"
  lrelease-qt5 "${pkgname}.pro"
  qmake-qt5 "${pkgname}.pro" -config release "DEFINES += NOSTATIC" "RESOURCES -= ${pkgname}.qrc"
	make
}

package() {
  install -Dvm755 "${pkgname}.sh" "${pkgdir}/usr/bin/${pkgname}"
  install -Dvm644 "org.archlinux.pkexec.${pkgname}.policy" -t "${pkgdir}/usr/share/polkit-1/actions"

  cd "${pkgname}-${pkgver}/src/${pkgname}"
  install -Dvm644 "${pkgname}"_*.qm -t "${pkgdir}/usr/share/${pkgname}"
  install -Dvm755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}.elf"
  install -Dvm644 "${pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
  install -Dvm644 'readme.md' -t "${pkgdir}/usr/share/doc/${pkgname}"

  for i in 16 24 32 48 64 128 256 512; do
    install -Dvm644 "${pkgname}_${i}.png" "${pkgdir}/usr/share/icons/hicolor/${i}x${i}/apps/${pkgname}.png"
  done
}

# vim: ts=2 sw=2 et: