Use https by default
[gentoo.git] / sys-kernel / aufs-sources / aufs-sources-4.0.6.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 ETYPE="sources"
8 K_WANT_GENPATCHES="base extras experimental"
9 K_GENPATCHES_VER="8"
10 K_DEBLOB_AVAILABLE="1"
11 UNIPATCH_STRICTORDER=1
12 inherit kernel-2 eutils readme.gentoo
13 detect_version
14 detect_arch
15
16 AUFS_VERSION=4.0_p20150629
17 AUFS_TARBALL="aufs-sources-${AUFS_VERSION}.tar.xz"
18 # git archive -v --remote=git://git.code.sf.net/p/aufs/aufs4-standalone aufs${AUFS_VERSION/_p*} > aufs-sources-${AUFS_VERSION}.tar
19 AUFS_URI="https://dev.gentoo.org/~jlec/distfiles/${AUFS_TARBALL}"
20
21 KEYWORDS="~amd64 ~x86"
22 HOMEPAGE="https://dev.gentoo.org/~mpagano/genpatches http://aufs.sourceforge.net/"
23 IUSE="deblob experimental module vanilla"
24
25 DESCRIPTION="Full sources including the Gentoo patchset for the ${KV_MAJOR}.${KV_MINOR} kernel tree and aufs4 support"
26 SRC_URI="
27         ${KERNEL_URI}
28         ${ARCH_URI}
29         ${AUFS_URI}
30         !vanilla? ( ${GENPATCHES_URI} )
31         "
32
33 PDEPEND="=sys-fs/aufs-util-4*"
34
35 README_GENTOO_SUFFIX="-r1"
36
37 src_unpack() {
38         if use vanilla; then
39                 unset UNIPATCH_LIST_GENPATCHES UNIPATCH_LIST_DEFAULT
40                 ewarn "You are using USE=vanilla"
41                 ewarn "This will drop all support from the gentoo kernel security team"
42         fi
43
44         UNIPATCH_LIST="
45                 "${WORKDIR}"/aufs4-kbuild.patch
46                 "${WORKDIR}"/aufs4-base.patch
47                 "${WORKDIR}"/aufs4-mmap.patch"
48
49         use module && UNIPATCH_LIST+=" "${WORKDIR}"/aufs4-standalone.patch"
50
51         unpack ${AUFS_TARBALL}
52
53         einfo "Using aufs4 version: ${AUFS_VERSION}"
54
55         kernel-2_src_unpack
56 }
57
58 src_prepare() {
59         if ! use module; then
60                 sed -e 's:tristate:bool:g' -i "${WORKDIR}"/fs/aufs/Kconfig || die
61         fi
62         cp -f "${WORKDIR}"/include/uapi/linux/aufs_type.h include/uapi/linux/aufs_type.h || die
63         cp -rf "${WORKDIR}"/{Documentation,fs} . || die
64 }
65
66 src_install() {
67         kernel-2_src_install
68         dodoc "${WORKDIR}"/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
69         docompress -x /usr/share/doc/${PF}/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch
70         readme.gentoo_create_doc
71 }
72
73 pkg_postinst() {
74         kernel-2_pkg_postinst
75         einfo "For more info on this patchset, and how to report problems, see:"
76         einfo "${HOMEPAGE}"
77         has_version sys-fs/aufs-util || \
78                 elog "In order to use aufs FS you need to install sys-fs/aufs-util"
79
80         readme.gentoo_pkg_postinst
81 }
82
83 pkg_postrm() {
84         kernel-2_pkg_postrm
85 }