Contents of /trunk/core/xfsprogs/xfsprogs-4.16.1-r1.smage2
Parent Directory | Revision Log
Revision 30942 -
(show annotations)
(download)
Wed May 16 14:45:21 2018 UTC (6 years, 4 months ago) by niro
File size: 2637 byte(s)
Wed May 16 14:45:21 2018 UTC (6 years, 4 months ago) by niro
File size: 2637 byte(s)
auto added: ver bump to 4.16.1-r1
1 | # $Id$ |
2 | |
3 | PNAME="xfsprogs" |
4 | PVER="4.16.1" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="sys-fs" |
8 | |
9 | DESCRIPTION="Administration and debugging tools for the XFS file system." |
10 | HOMEPAGE="http://xfs.org" |
11 | |
12 | DEPEND=">= virtual/glibc |
13 | >= sys-libs/libblkid-2.31 |
14 | >= sys-libs/libuuid-2.31 |
15 | >= sys-libs/readline-7.0" |
16 | |
17 | SDEPEND=">= sys-dev/gettext-0.18 |
18 | >= virtual/sed" |
19 | |
20 | SRCFILE="${PNAME}-${PVER}.tar.xz" |
21 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
22 | |
23 | sminclude mtools |
24 | |
25 | SRC_URI=( |
26 | https://www.kernel.org/pub/linux/utils/fs/xfs/${PNAME}/${SRCFILE} |
27 | mirror://${PNAME}/${SRCFILE} |
28 | ) |
29 | |
30 | UP2DATE="updatecmd https://www.kernel.org/pub/linux/utils/fs/xfs/${PNAME} | highesttarball xz" |
31 | |
32 | src_prepare() |
33 | { |
34 | munpack ${SRCFILE} || die |
35 | cd ${SRCDIR} |
36 | |
37 | # fix CFLAGS and some install pathes |
38 | sed -i "/^PKG_DOC_DIR/s:=.*:= /usr/share/doc/${PNAME}-${PVER}:" \ |
39 | include/builddefs.in || die |
40 | |
41 | # remove static |
42 | sed -i '1iLLDFLAGS = -static-libtool-libs' {estimate,fsr}/Makefile || die |
43 | sed -i "/LLDFLAGS/s:-static-libtool-libs::" $(find -name Makefile) || die |
44 | sed -i '1iLLDFLAGS = -static' {estimate,fsr}/Makefile || die |
45 | sed -i "/LLDFLAGS/s:-static::" $(find -name Makefile) || die |
46 | |
47 | # libdisk has broken blkid conditional checking |
48 | sed -i '/LIB_SUBDIRS/s:libdisk::' Makefile || die |
49 | |
50 | # fix as-needed |
51 | echo 'LTLIBS = $(LIBUUID) $(LIBXFS)' >> libxlog/Makefile || die |
52 | echo 'LTLIBS += $(LIBUUID)' >> libxfs/Makefile || die |
53 | echo 'LTLIBS += $(LIBBLKID) $(LIBXFS)' >> libxcmd/Makefile || die |
54 | echo 'LTLIBS += $(LIBBLKID) $(LIBXFS)' >> libfrog/Makefile || die |
55 | |
56 | # build libfrog after libxfs to fix as-needed |
57 | sed -i -e '/^$(LIBFROG_SUBDIR)\:/s:include:& libxfs:' \ |
58 | -e '/^$(LIB_SUBDIRS) $(TOOL_SUBDIRS)\:/s:include libfrog:include:' \ |
59 | Makefile || die |
60 | |
61 | # honor usr-move |
62 | sed -i -e "s:root_sbindir='/sbin':root_sbindir='/usr/sbin':" \ |
63 | -e 's:root_libdir="/${base_libdir}":root_libdir="/usr/${base_libdir}":' \ |
64 | configure.ac configure || die |
65 | } |
66 | |
67 | src_compile() |
68 | { |
69 | cd ${SRCDIR} |
70 | |
71 | # enable CFLAGS |
72 | export OPTIMIZER="${CFLAGS}" |
73 | |
74 | # disable debug code |
75 | export DEBUG=-DNDEBUG |
76 | |
77 | mconfigure \ |
78 | --libexecdir=/usr/$(mlibdir) \ |
79 | --enable-gettext \ |
80 | --enable-readline \ |
81 | --enable-blkid \ |
82 | --disable-editline \ |
83 | || die |
84 | |
85 | mmake -j1 V=1 || die |
86 | } |
87 | |
88 | src_install() |
89 | { |
90 | cd ${SRCDIR} |
91 | |
92 | # needed directories |
93 | minstalldir /usr/$(mlibdir) || die |
94 | |
95 | make DIST_ROOT=${BINDIR} \ |
96 | DK_INC_DIR=${BINDIR}/usr/include/disk \ |
97 | install install-dev \ |
98 | || die |
99 | |
100 | # we want compressed docs |
101 | rm -rf ${BINDIR}/usr/share/doc || die |
102 | |
103 | # prune unneeded docs |
104 | rm doc/{CHANGES.gz,INSTALL,Makefile} || die |
105 | |
106 | # sometime /var/tmp exist, remove it, to keep the right permissions |
107 | [[ -d ${BINDIR}/var ]] && rm -rf ${BINDIR}/var |
108 | |
109 | minstalldocs doc/* || die |
110 | } |