summaryrefslogtreecommitdiff
path: root/org.handhelds.familiar/classes/debian-vampyre.bbclass
blob: f995ed026489a029b1eb192a67420c6cf1072cf1 (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
# debian-vampyre.bbclass - the supermarket thing
#
# Copyright (C) 2006, Rene Wagner
# Released under the MIT license (see org.handhelds.familiar/COPYING.MIT)
#

PN = "${@bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[0] or 'defaultpkgname'}"
DPV = "${@'-'.join((bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1.0').split('-')[:-1])}"
DPR = "${@(bb.parse.BBHandler.vars_from_file(bb.data.getVar('FILE',d),d)[1] or '1').split('-')[-1]}"
PV = "${DPV}.debian${DPR}"
S = "${WORKDIR}/${PN}-${DPV}"

DEBIAN_ARCHIVE ?= "main"
DEBIAN_BASE_URI = "${DEBIAN_MIRROR}/${DEBIAN_ARCHIVE}/${@bb.data.getVar('PN', d, 1)[0]}/${PN}"
SRC_URI = "${DEBIAN_BASE_URI}/${PN}_${DPV}.orig.tar.gz \
           ${DEBIAN_BASE_URI}/${PN}_${DPV}-${DPR}.diff.gz;patch=1 "
FILESPATH = "${@base_set_filespath([ "${FILE_DIRNAME}/${PN}-${DPV}-${DPR}", "${FILE_DIRNAME}/${PN}-${DPV}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ], d)}"

do_install_append () {
	mkdir -p ${D}${datadir}/doc/${PN}
	install -m 0644 debian/copyright ${D}${datadir}/doc/${PN}
	rm -f ${D}${datadir}/doc/${PN}/changelog.Debian*
	install -m 0644 debian/changelog ${D}${datadir}/doc/${PN}/changelog.Debian
	gzip -9 ${D}${datadir}/doc/${PN}/changelog.Debian
	if [ -f debian/README.Debian ]; then
		install -m 0644 debian/README.Debian ${D}${datadir}/doc/${PN}/
	fi
}