summaryrefslogtreecommitdiff
blob: bed8d5a44fb76fc7bb68bd2ab68c8134987b4a33 (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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

EAPI=6

inherit eutils gnome2-utils linux-info rpm xdg-utils

DESCRIPTION="Nero Burning ROM for Linux"
HOMEPAGE="http://nerolinux.nero.com"
SRC_URI="
	x86? ( ${PN}linux-${PV}-x86.rpm )
	amd64? ( ${PN}/${PN}linux-${PV}-x86_64.rpm )"

LICENSE="Nero-EULA-US"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="doc"

RESTRICT="strip mirror test fetch"

RDEPEND="
	x11-libs/gtk+:2
	x11-libs/libX11
	x11-libs/libXinerama
	x11-libs/pango[X]"
DEPEND=""

S="${WORKDIR}"

PATCHES=( "${FILESDIR}"/${P}-qa-desktop-files.patch )

pkg_nofetch() {
	local nero_arch
	use amd64 && nero_arch=64
	use x86 && ner_arch=32

	einfo "Please visit https://www.nero.com/enu/downloads/previous-versions/download-linux4-update.php"
	einfo " and use the 'RPM package ${nero_arch} bit' download then place ${A}"
	einfo " into ${DISTDIR}"
}

pkg_setup() {
	QA_TEXTRELS="opt/${PN}/$(get_libdir)/${PN}/*
		opt/${PN}/$(get_libdir)/libNeroAPI.so"
	QA_EXECSTACK="opt/${PN}/$(get_libdir)/nero/*"
	QA_PREBUILT="opt/${PN}/${PN}.*
		opt/${PN}/${PN}
		opt/${PN}/$(get_libdir)/.*so
		opt/${PN}/$(get_libdir)/${PN}/*
		opt/${PN}/$(get_libdir)/${PN}/plug-ins/*
		usr/share/${PN}/helpers/splash/nerosplash"

	CONFIG_CHECK="~CHR_DEV_SG"
	linux-info_pkg_setup
}

src_install() {
	insinto /etc
	doins -r etc/nero

	insinto /opt/nero
	doins -r usr/$(get_libdir)
	dosym /opt/nero/$(get_libdir)/nero /usr/$(get_libdir)/nero

	exeinto /opt/nero
	doexe usr/bin/nero*

	insinto /usr/share
	doins -r usr/share/nero usr/share/locale usr/share/icons

	domenu usr/share/applications/*.desktop
	doicon usr/share/pixmaps/nerolinux.xpm

	doman usr/share/man/man1/*

	use doc && local DOCS+=( usr/share/doc/nero/*.pdf )
	einstalldocs

	make_wrapper nero ./nero /opt/nero /opt/${PN}/$(get_libdir)
	make_wrapper nerocmd ./nerocmd /opt/nero /opt/nero/$(get_libdir)
	make_wrapper neroexpress ./neroexpress /opt/nero /opt/nero/$(get_libdir)

	# This is a ugly hack to fix burning in x86_64
	# http://club.cdfreaks.com/showthread.php?t=218041
	if use amd64; then
		cp usr/share/nero/Nero*.txt "${ED%/}"/opt/nero/$(get_libdir)/nero || die
	fi
}

pkg_preinst() {
	gnome2_icon_savelist
}

pkg_postinst() {
	xdg_desktop_database_update
	xdg_mimeinfo_database_update
	gnome2_icon_cache_update

	nero --perform-post-installation || die
}

pkg_postrm() {
	xdg_desktop_database_update
	xdg_mimeinfo_database_update
	gnome2_icon_cache_update
}