summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c5cebf49dabf2a1bee9b9f936671611ded6a79df (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: Tony Lambiris <tony@libpcap.net>

pkgname=nauz-file-detector-git
pkgver=0.09.r1147.gdc56e5e
pkgrel=1
pkgdesc="Nauz File Detector is a portable linker/compiler/packer identifier utility."
arch=(x86_64)
url="http://n10info.blogspot.com/2018/12/nauz-file-detector.html"
license=('MIT')
makedepends=('git' 'make' 'qt5-base')
source=("${pkgname}::git+https://github.com/horsicq/Nauz-File-Detector")
sha256sums=('SKIP')

pkgver() {
	cd "${srcdir}/${pkgname}"

	git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g;s/^v//g'
}

prepare() {
	cd "${srcdir}/${pkgname}"

	git reset HEAD --hard
	git submodule update --init --recursive
}

build() {
	cd "${srcdir}/${pkgname}"

	function makeproject() {
		pushd $1

		qmake $1.pro -spec linux-g++
		make -j $(nproc) -f Makefile clean
		make -j $(nproc) -f Makefile

		rm -rf Makefile
		rm -rf Makefile.Release
		rm -rf Makefile.Debug
		rm -rf object_script.*

		popd
	}

	makeproject gui_source
	makeproject console_source
}

package() {
	cd "${srcdir}/${pkgname}"

	install -Dm755 build/release/nfd "${pkgdir}/usr/bin/nfd"
	install -Dm755 build/release/nfdc "${pkgdir}/usr/bin/nfdc"
	install -Dm644 LINUX/nfd.desktop "${pkgdir}/usr/share/applications/nfd.desktop"
}