forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
qxmledit-0.8.8.1.ebuild
63 lines (50 loc) · 1.7 KB
/
qxmledit-0.8.8.1.ebuild
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
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit multilib eutils qt4-r2 versionator
MY_PV="$(replace_version_separator 3 '-')"
MY_P="qxmledit-${MY_PV}-src"
DESCRIPTION="Qt4 XML Editor"
HOMEPAGE="http://qxmledit.org/"
SRC_URI="https://${PN}.googlecode.com/files/${MY_P}.tgz"
LICENSE="LGPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE="debug"
DEPEND=">=dev-qt/qtcore-4.7:4
>=dev-qt/qtgui-4.7:4
>=dev-qt/qtsql-4.7:4
>=dev-qt/qtsvg-4.7:4
>=dev-qt/qtxmlpatterns-4.7:4"
RDEPEND="${DEPEND}"
DOCS="AUTHORS NEWS README ROADMAP TODO"
S="${WORKDIR}/${PN}-${MY_PV}"
src_prepare() {
# fix doc dir
sed -i "/INST_DOC_DIR = / s|/opt/${PN}|/usr/share/doc/${PF}|" \
src/QXmlEdit{,Widget}.pro src/sessions/QXmlEditSessions.pro || \
die "failed to fix doc installation path"
# fix binary installation path
sed -i "/INST_DIR = / s|/opt/${PN}|/usr/bin|" \
src/QXmlEdit{,Widget}.pro src/sessions/QXmlEditSessions.pro || \
die "failed to fix binary installation path"
# fix helper libraries installation path
sed -i "/INST_LIB_DIR = / s|/opt/${PN}|/usr/$(get_libdir)|" \
src/QXmlEdit{,Widget}.pro \
src/sessions/QXmlEditSessions.pro || \
die "failed to fix library installation path"
# fix translations
sed -i "/INST_DATA_DIR = / s|/opt|/usr/share|" src/QXmlEdit{,Widget}.pro \
src/sessions/QXmlEditSessions.pro || \
die "failed to fix translations"
# fix include
sed -i "/INST_INCLUDE_DIR = / s|/opt|/usr/share|" src/QXmlEditWidget.pro \
|| die "failed to fix include directory"
qt4-r2_src_prepare
}
src_install() {
qt4-r2_src_install
newicon src/images/icon.png ${PN}.png
make_desktop_entry QXmlEdit QXmlEdit ${PN} "Qt;Utility;TextEditor"
}