summaryrefslogtreecommitdiff
path: root/app-misc/kogaion-skel/kogaion-skel-1.ebuild
blob: 47212eb52400ff20fd51e8c47bc74a77cea01675 (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
# Copyright 1999-2014 Sabayon Linux
# Copyright 2014 Kogaion
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI=4
EGIT_REPO_URI="git://github.com/Rogentos/roskel.git"

inherit eutils git-2 fdo-mime

DESCRIPTION="Kogaion Linux skel tree"
HOMEPAGE="http://www.rogentos.ro/"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~arm ~x86"
IUSE=""
RDEPEND=""
DEPEND="!>=app-misc/rogentos-skel-1"

src_install () {
	dodir /etc/xdg/menus
	cp "${S}"/* "${D}"/etc/ -Ra
	chown root:root "${D}"/etc/skel -R

	dodir /usr/share/desktop-directories
	cp "${FILESDIR}"/3.0/xdg/*.directory "${D}"/usr/share/desktop-directories/
	dodir /usr/share/kogaion
	cp -a "${FILESDIR}"/3.0/* "${D}"/usr/share/kogaion/
	doicon "${FILESDIR}"/3.0/img/kogaion-weblink.png

	insinto /etc/bash/ || die "Failed to insinto"
	doins "${S}"/skel/.bash/bashrc /etc/bash/ || die "Cannot copy bashrc"
}

pkg_postinst() {
	if [ -x "/usr/bin/xdg-desktop-menu" ]; then
		xdg-desktop-menu install \
			/usr/share/kogaion/xdg/kogaion-kogaion.directory \
			/usr/share/kogaion/xdg/*.desktop
	fi

	fdo-mime_desktop_database_update
}

pkg_prerm() {
	if [ -x "/usr/bin/xdg-desktop-menu" ]; then
		xdg-desktop-menu uninstall /usr/share/kogaion/xdg/kogaion-kogaion.directory /usr/share/kogaion/xdg/*.desktop
	fi
}