summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 53bf1ee8421ec6aaac0e68f07f531e194be3739d (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
# Based on: woeusb-ng Jakub SzymaƄski <jakubmateusz@poczta.onet.pl>
pkgname=woeusb-ng-git
pkgver=0.2.5.r64.gbcb7583
pkgrel=1
pkgdesc="Simple tool that enable you to create your own usb stick with Windows installer."
arch=('any')
url="https://github.com/WoeUSB/WoeUSB-ng"
license=('GPL3')
depends=(
    'parted'
    'dosfstools'
    'ntfs-3g'
    'grub'
    'p7zip'
    'python'
    'python-pip'
    'python-wxpython'
    'xdg-utils'
    'python-termcolor'
)
makedepends=(
    'python-setuptools'
    'git'
)
provides=('woeusb')
conflicts=('woeusb' 'woeusb-git' 'woeusb-ng')
source=( "${pkgname}::git+${url}")
sha256sums=('SKIP')

pkgver() {
    git -C "${srcdir}/${pkgname}" describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./'
}

build() {
    cd "${srcdir}/${pkgname}"
    python setup.py build
}

package() {
    # Disable weird post install hook
    sed --quiet --in-place 's|post_install()$|#post_install()|g' \
        "${srcdir}/${pkgname}/setup.py"
    # Install package
    cd "${srcdir}/${pkgname}"
    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
    # Copy files because the installer hook is atrocious
    install -dm 0755 "${pkgdir}/usr"
    install -dm 0755 "${pkgdir}/usr/bin"
    install -dm 0755 "${pkgdir}/usr/share"
    install -dm 0755 "${pkgdir}/usr/share/applications"
    install -dm 0755 "${pkgdir}/usr/share/icons"
    install -dm 0755 "${pkgdir}/usr/share/polkit-1"
    install -dm 0755 "${pkgdir}/usr/share/polkit-1/actions"
    install -Dm 0755 "${srcdir}/${pkgname}/WoeUSB/woeusbgui" \
        "${pkgdir}/usr/bin/woeusbgui"
    install -Dm 0644 "${srcdir}/${pkgname}/WoeUSB/data/icon.ico" \
        "${pkgdir}/usr/share/icons/WoeUSB-ng/icon.ico"
    install -Dm 0755 "${srcdir}/${pkgname}/miscellaneous/WoeUSB-ng.desktop" \
        "${pkgdir}/usr/share/applications/WoeUSB-ng.desktop"
    install -Dm 0755 "${srcdir}/${pkgname}/miscellaneous/com.github.woeusb.woeusb-ng.policy" \
        "${pkgdir}/usr/share/polkit-1/actions/com.github.woeusb.woeusb-ng.policy"
}