Magellan Linux

Contents of /trunk/core/xfsprogs/xfsprogs-3.2.4-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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