summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: eab169ae0c8c4206dede2ccc0420cd70f42dc292 (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
# Maintainer: Yuuta Liang <yuuta@yuuta.moe>
pkgname=winfile
pkgver=10.1.4.0
pkgrel=1
epoch=
pkgdesc="Original Windows File Manager (winfile) with enhancements"
arch=(x86_64)
url="https://github.com/microsoft/winfile"
license=('custom')
groups=()
depends=(mingw-w64-crt)
makedepends=(mingw-w64-gcc mingw-w64-headers)
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
source=("src::git+https://github.com/microsoft/winfile.git"
"mingw_compile.patch"
"https://patch-diff.githubusercontent.com/raw/microsoft/winfile/pull/262.patch"
"winfile")
noextract=()
sha256sums=('SKIP'
            '920e92250a36d96e232d8ca1e556531c166e5cb9137e618396ff1790eb86eced'
            '6ff49930b6e473e66e506444643edd99bd0f46278d091df22aeb9f95f7f6eacc'
            'e323e64c3cc2cfc20af3d6aa1d5794ab09c2a21643d45ad7ca9c6fa111c5110e')
validpgpkeys=()

prepare() {
	cd "$srcdir/src"
	git checkout v$pkgver
	# Fix some issues compiling on *nix (e.g. directory separator, toolchain location, header names, etc)
	git apply ../mingw_compile.patch
	# Pull request #262: WinFile: Fix multiple definition of variables error in MinGW
	git apply ../262.patch
}

build() {
	cd "$srcdir/src"
	TOOLCHAIN=x86_64-w64-mingw32- make
}

package() {
	cd "$srcdir/src"
	mkdir -p "$pkgdir"/usr/share/$pkgname
	mkdir -p "$pkgdir"/usr/share/licenses/$pkgname
	mkdir -p "$pkgdir"/usr/bin
	install -Dm755 winfile.exe "$pkgdir"/usr/share/$pkgname
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname
	install -Dm755 ../winfile "$pkgdir"/usr/bin
}