Tizen recipes: avoid -j16
[scm/bb/meta-tizen.git] / meta-tizen-common-base / recipes-security / gpg2 / gpg2.inc
1 DESCRIPTION = "GnuPG 2"
2 HOMEPAGE = "http://www.gnupg.org/aegypten2/"
3 SECTION = "Security/Certificate Management"
4 LICENSE = "GPL-3.0+"
5 PV = "2.0.19"
6
7 SRC_URI = ""
8
9 S = "${WORKDIR}/git"
10
11 inherit manifest autotools-brokensep
12
13 BBCLASSEXTEND = ""
14 PROVIDES = ""
15
16 #PROVIDES by gpg2
17 # the PROVIDES rules is ignore "gnupg = 2.0.19"
18 PROVIDES += "gnupg"
19 RPROVIDES_gpg2 += "gnupg"
20 # the PROVIDES rules is ignore "gpg = 1.4.9"
21 PROVIDES += "gpg"
22 RPROVIDES_gpg2 += "gpg"
23 # the PROVIDES rules is ignore "newpg  "
24 PROVIDES += "newpg"
25 RPROVIDES_gpg2 += "newpg"
26 # the PROVIDES rules is ignore "gpg2_signd_support  "
27 PROVIDES += "gpg2_signd_support"
28 RPROVIDES_gpg2 += "gpg2_signd_support"
29
30
31 RDEPENDS = ""
32
33 DEPENDS = ""
34 #DEPENDS of gpg2
35 #Replace "DEPENDS" on gettext by "inherit gettext"
36 inherit gettext
37 DEPENDS += "libksba"
38 DEPENDS += "libassuan"
39 DEPENDS += "adns"
40 DEPENDS += "pth"
41 DEPENDS += "zlib"
42 inherit pkgconfig
43 DEPENDS += "libgpg-error"
44 DEPENDS_append_class-native = " automake-native"
45 DEPENDS_append_class-target = " automake-native"
46 DEPENDS_append_class-native = " readline-native"
47 DEPENDS_append_class-target = " readline-native"
48 DEPENDS += "libusb"
49 DEPENDS += "expect"
50 DEPENDS += "curl"
51 DEPENDS_append_class-native = " fdupes-native"
52 DEPENDS_append_class-target = " fdupes-native"
53 DEPENDS += "libgcrypt"
54
55 do_prep() {
56  cd ${S}
57  chmod -Rf a+rX,u+w,g-w,o-w ${S}
58  #setup  -q -n gnupg-2.0.19
59  cp ${S}/packaging/gpg2.manifest .
60  
61  
62 }
63 do_patch_append() {
64     bb.build.exec_func('do_prep', d)
65 }
66
67 do_configure() {
68 }
69
70 do_compile() {
71  cd ${S}
72   LANG=C
73   export LANG
74   unset DISPLAY
75   LD_AS_NEEDED=1; export LD_AS_NEEDED ;
76   
77   # build PIEs (position independent executables) for address space randomisation:
78   PIE="-fpie"
79   export CFLAGS="$CFLAGS ${PIE}"
80   export LDFLAGS=-pie
81   
82   
83   autotools_do_configure
84   
85   oe_runmake ${PARALLEL_MAKE}
86   
87   
88   
89 }
90 EXTRA_OECONF += " --libexecdir=${prefix}/lib --docdir=${prefix}/share/doc/packages/gpg2 --with-agent-pgm=${prefix}/bin/gpg-agent --with-scdaemon-pgm=${prefix}/bin/scdaemon --enable-gpgsm=yes --enable-gpg --with-gnu-ld --disable-doc"
91
92 do_install() {
93  export RPM_BUILD_ROOT=${D}
94  cd ${S}
95  LANG=C
96  export LANG
97  unset DISPLAY
98  rm -rf ${D}
99  mkdir -p ${D}
100  
101  
102    oe_runmake \
103          DESTDIR=${D} \
104          INSTALL_ROOT=${D} \
105          BINDIR=${prefix}/bin \
106    install  
107    rm -f ${D}${infodir}/dir 
108    find ${D} -regex ".*\.la$" | xargs rm -f -- 
109    find ${D} -regex ".*\.a$" | xargs rm -f --
110  mkdir -p ${D}${sysconfdir}/gnupg/
111  
112  install -m 644 doc/examples/gpgconf.conf ${D}${sysconfdir}/gnupg
113  
114  rm -rf ${D}${prefix}/share/doc/packages/gpg2/examples/gpgconf.conf
115  
116  ln -sf gpg2 ${D}${prefix}/bin/gpg
117  ln -sf gpgv2 ${D}${prefix}/bin/gpgv
118  
119  rm -rf ${D}${prefix}/share/locale/en@{bold,}quot
120  rm -rf ${D}${prefix}/share/locale/en@{bold,}quot
121  rm -fr ${D}${prefix}/share/doc
122  
123  #find_lang gnupg2
124  
125  #fdupes ${D}
126  
127  
128 }
129
130 PACKAGES = "${PN}-dbg ${PN}-doc ${PN}-locale"
131 PACKAGES += " gpg2 "
132
133 gpg2_files = ""
134 gpg2_files += "${prefix}/bin/*"
135 gpg2_files += "${prefix}/lib/[^d]*"
136 gpg2_files += "${prefix}/sbin/addgnupghome"
137 gpg2_files += "${prefix}/sbin/applygnupgdefaults"
138 gpg2_files += "${prefix}/share/gnupg"
139 gpg2_files += "${sysconfdir}/gnupg/gpgconf.conf"
140 MANIFESTFILES_${PN} = "gpg2.manifest"
141
142 FILES_${PN} = "${gpg2_files}"
143
144 PKG_gpg2= "gpg2"
145
146 require gpg2-extraconf.inc
147