Magellan Linux

Annotation of /trunk/core/argon2/argon2-20190702-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32927 - (hide annotations) (download)
Mon Oct 7 06:35:55 2019 UTC (4 years, 7 months ago) by niro
File size: 1497 byte(s)
auto added: ver bump to 20190702-r1
1 niro 32927 # $Id$
2    
3     PNAME="argon2"
4     PVER="20190702"
5     PBUILD="r1"
6    
7     PCAT="app-crypt"
8    
9     DESCRIPTION="A password-hashing function."
10     HOMEPAGE="https://github.com/P-H-C/phc-winner-argon2"
11    
12     DEPEND=">= virtual/glibc"
13    
14     SRCFILE="${PNAME}-${PVER}.tar.gz"
15     SRCDIR="${BUILDDIR}/phc-winner-argon2-${PVER}"
16    
17     msetfeature "!check" # makefile provide no check function
18     sminclude multilib mbuild
19    
20     SRC_URI=(
21     https://github.com/P-H-C/phc-winner-argon2/archive/${PVER}/${SRCFILE}
22     mirror://${PNAME}/${SRCFILE}
23     )
24    
25     UP2SEPERATOR="\/"
26     UP2DATE="updatecmd https://github.com/P-H-C/phc-winner-argon2/releases | highesttarball gz"
27    
28     src_prepare()
29     {
30     munpack ${SRCFILE} || die
31    
32     # fix libdir
33     all-abis 'sed -i "s:^\(LIBRARY_REL =\).*:\1 $(mlibdir):"' ${SRCDIR}-$(mabi)/Makefile || die
34     }
35    
36     src_compile()
37     {
38     mmake OPTTARGET=none || die
39     }
40    
41     src_install()
42     {
43     mmake OPTTARGET=none DESTDIR=${BINDIR} install || die
44    
45     # create and install a custon pkgconfig file
46     cat > ${BUILDDIR}/libargon2.pc << 'EOF'
47     prefix=/usr
48     exec_prefix=${prefix}
49     libdir=${prefix}/@@MLIBDIR@@
50     includedir=${prefix}/include
51    
52     Name: libargon2
53     Description: Development libraries for libargon2
54     Version: @@PVER@@
55     Libs: -L${libdir} -largon2 -lrt -ldl
56     Cflags:
57     URL: https://github.com/P-H-C/phc-winner-argon2
58     EOF
59    
60     all-abis minstalldir /usr/'$(mlibdir)'/pkgconfig || die
61     all-abis minstallfile ${BUILDDIR}/libargon2.pc /usr/'$(mlibdir)'/pkgconfig/ || die
62     all-abis sed -i -e 's:@@MLIBDIR@@:$(mlibdir):g' -e "s:@@PVER@@:${PVER}:g" ${BINDIR}/usr/'$(mlibdir)'/pkgconfig/libargon2.pc || die
63     }