Skip to content

Commit

Permalink
app-cdr/nero: Fix QA violations
Browse files Browse the repository at this point in the history
Gentoo-bug: 593382
* EAPI=6
* Take over maintainership of package
* Fix .desktop files

Package-Manager: portage-2.3.2
  • Loading branch information
SoapGentoo committed Oct 29, 2016
1 parent ee5fa99 commit 8030a7c
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 23 deletions.
23 changes: 23 additions & 0 deletions app-cdr/nero/files/nero-4.0.0.0b-qa-desktop-files.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Fix QA issues caused by outdated .desktop files:
* QA Notice: This package installs one or more .desktop files that do not
* pass validation.
*
* /usr/share/applications/nerolinux.desktop: warning:
* key "Categories" in group "Desktop Entry" contains a deprecated value "Application"

--- a/usr/share/applications/nerolinux.desktop
+++ b/usr/share/applications/nerolinux.desktop
@@ -53,4 +53,4 @@
Icon=nerolinux
MimeType=application/x-cd-image;application/x-iso;application/x-cue;application/x-nero-disc-image;application/x-nero-linux-compilation
Terminal=false
-Categories=Application;AudioVideo;DiscBurning;Recorder;
+Categories=AudioVideo;DiscBurning;Recorder;
--- a/usr/share/applications/nerolinuxexpress.desktop
+++ b/usr/share/applications/nerolinuxexpress.desktop
@@ -53,4 +53,4 @@
Icon=nerolinuxexpress
MimeType=application/x-cd-image;application/x-iso;application/x-cue;application/x-nero-disc-image;application/x-nero-linux-compilation
Terminal=false
-Categories=Application;AudioVideo;DiscBurning;Recorder;
+Categories=AudioVideo;DiscBurning;Recorder;
5 changes: 4 additions & 1 deletion app-cdr/nero/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<!-- maintainer-needed -->
<maintainer type="person">
<email>[email protected]</email>
<name>David Seifert</name>
</maintainer>
</pkgmetadata>
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Copyright 1999-2012 Gentoo Foundation
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

EAPI=5
inherit eutils fdo-mime rpm multilib gnome2-utils linux-info
EAPI=6

inherit eutils fdo-mime gnome2-utils linux-info rpm

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 )
"
amd64? ( ${PN}/${PN}linux-${PV}-x86_64.rpm )"

LICENSE="Nero-EULA-US"
SLOT="0"
Expand All @@ -23,33 +23,34 @@ RDEPEND="
x11-libs/gtk+:2
x11-libs/libX11
x11-libs/libXinerama
x11-libs/pango[X]
"
x11-libs/pango[X]"
DEPEND=""

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"

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 http://www.nero.com/enu/downloads/previous-versions/download-linux4-update.php"
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
}
Expand All @@ -72,15 +73,19 @@ src_install() {
doicon usr/share/pixmaps/nerolinux.xpm

doman usr/share/man/man1/*
use doc && dodoc usr/share/doc/nero/*.pdf

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

pkg_preinst() {
Expand All @@ -91,7 +96,8 @@ pkg_postinst() {
fdo-mime_desktop_database_update
fdo-mime_mime_database_update
gnome2_icon_cache_update
nero --perform-post-installation

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

pkg_postrm() {
Expand Down

0 comments on commit 8030a7c

Please sign in to comment.