blob: 2bbdc98033d07260ff9e06a76357b28181eb3a30 (
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
|
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-admin/eselect-news/eselect-news-20080320.ebuild,v 1.1 2008/03/20 15:25:49 peper Exp $
DESCRIPTION="GLEP 42 news reader"
HOMEPAGE="http://paludis.pioto.org/"
SRC_URI="http://dev.gentooexperimental.org/~peper/distfiles/news.eselect-${PV}"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
IUSE=""
RDEPEND=">=app-admin/eselect-1.0.11"
src_install() {
insinto /usr/share/eselect/modules
newins "${DISTDIR}/news.eselect-${PV}" news.eselect || die
keepdir /var/lib/gentoo/news
}
pkg_postinst() {
local paludis_data="${ROOT}var/lib/paludis/news" gentoo_data="${ROOT}var/lib/gentoo/news"
if [[ -d "${paludis_data}" && ! -L "${paludis_data}" ]] ; then
einfo "Merging news data at '${paludis_data}' with '${gentoo_data}'"
local f fname
for f in "${paludis_data}"/*.{read,unread,skip} ; do
fname=$(basename "${f}")
if [[ -f "${gentoo_data}/${fname}" ]] ; then
cat "${gentoo_data}/${fname}" >> "${f}"
fi
sort -u "${f}" > "${gentoo_data}/${fname}"
done
rm -r "${paludis_data}"
ln -s "${gentoo_data}" "${paludis_data}"
fi
}
|