summaryrefslogtreecommitdiff
blob: ea85883e06f5d479edc74e46526f49cdcf50068e (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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit desktop udev unpacker xdg-utils

DESCRIPTION="A modern and intuitive control software for the Batronix USB programming devices"
HOMEPAGE="https://www.batronix.com"
SRC_URI="
	amd64? ( https://www.batronix.com/exe/Batronix/Prog-Express/deb/${P}-1.amd64.deb )
	x86? ( https://www.batronix.com/exe/Batronix/Prog-Express/deb/${P}-1.i386.deb )
"

KEYWORDS="-* amd64 ~x86"
LICENSE="prog-express"
SLOT="0"

RDEPEND="
	dev-db/sqlite:3
	dev-dotnet/gtk-sharp:2
	dev-dotnet/libgdiplus
	dev-lang/mono
	dev-lang/mono-basic
	virtual/libusb:1
	virtual/udev
"

S="${WORKDIR}"

DOCS=(
	"usr/share/doc/prog-express/changelog"
	"usr/share/doc/prog-express/manuals"
)

QA_PREBUILT="
	usr/bin/bxusb
	usr/bin/bxusb-gui
	usr/bin/prog-express
	usr/sbin/bxfxload
"

src_unpack() {
	unpack_deb ${A}
}

src_prepare() {
	default

	gunzip usr/share/doc/prog-express/changelog.gz usr/share/man/man1/*.gz || die
}

src_install() {
	dobin usr/bin/{bxusb,bxusb-gui,prog-express}
	dosbin usr/sbin/bxfxload

	insinto /usr/lib
	doins -r usr/lib/bxusb usr/lib/prog-express

	insinto /usr/lib/prog-express
	doins "${FILESDIR}"/pe.exe.config

	udev_dorules lib/udev/rules.d/85-batronix-devices.rules

	doicon usr/share/pixmaps/prog-express.png

	domenu usr/share/applications/prog-express.desktop

	doman usr/share/man/man1/{bxfxload,bxusb,bxusb-gui,prog-express}.1
}

pkg_postinst() {
	udev_reload
	xdg_desktop_database_update
	xdg_icon_cache_update
}

pkg_postrm() {
	udev_reload
	xdg_desktop_database_update
	xdg_icon_cache_update
}