Magellan Linux

Contents of /trunk/core/xfsprogs/xfsprogs-3.1.7-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10920 - (show annotations) (download)
Sun Feb 5 01:18:32 2012 UTC (12 years, 4 months ago) by niro
File size: 2134 byte(s)
-forced disabled editline, to prefer readline
1 # $Id$
2
3 PNAME="xfsprogs"
4 PVER="3.1.7"
5 PBUILD="r2"
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-apps/util-linux-2.20
14 >= sys-libs/readline-6.2"
15
16 SDEPEND=">= sys-dev/gettext-0.18
17 >= sys-apps/sed-4"
18
19 SRCFILE="${PNAME}-${PVER}.tar.gz"
20 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
21
22 sminclude mtools
23
24 SRC_URI=(
25 ftp://oss.sgi.com/projects/xfs/cmd_tars/${SRCFILE}
26 ftp://oss.sgi.com/projects/xfs/previous/cmd_tars/${SRCFILE}
27 mirror://${PNAME}/${SRCFILE}
28 mirror://${PNAME}/${PNAME}-${PVER}-sharedlibs.patch
29 )
30
31 #UP2DATE="updatecmd ftp://oss.sgi.com/projects/xfs/cmd_tars | grep ${PNAME} | sed -n 's/.*_\(.*\)-[0-9]\..*/\1/;$ p'"
32 UP2DATE="updatecmd ftp://oss.sgi.com/projects/xfs/cmd_tars | grep ${PNAME} | lasttarball gz"
33
34 src_prepare()
35 {
36 munpack ${SRCFILE} || die
37 cd ${SRCDIR}
38
39 # prefer shared libs
40 mpatch -Np1 ${PNAME}-${PVER}-sharedlibs.patch || die
41
42 # fix CFLAGS and some install pathes
43 sed -i "/^PKG_DOC_DIR/s:=.*:= /usr/share/doc/${PNAME}-${PVER}:" \
44 include/builddefs.in || die
45
46 # remove static
47 sed -i '1iLLDFLAGS = -static' {estimate,fsr}/Makefile || die
48 sed -i "/LLDFLAGS/s:-static::" $(find -name Makefile) || die
49
50 # libdisk has broken blkid conditional checking
51 sed -i '/LIB_SUBDIRS/s:libdisk::' Makefile || die
52 }
53
54 src_compile()
55 {
56 cd ${SRCDIR}
57
58 # enable CFLAGS
59 export OPTIMIZER="${CFLAGS}"
60
61 # disable debug code
62 export DEBUG=-DNDEBUG
63
64 mconfigure \
65 --bindir=/bin \
66 --sbindir=/sbin \
67 --libexecdir=/$(mlibdir) \
68 --enable-gettext \
69 --enable-readline \
70 --disable-editline \
71 || die
72
73 mmake -j1 V=1 || die
74 }
75
76 src_install()
77 {
78 cd ${SRCDIR}
79
80 # needed directories
81 minstalldir /usr/$(mlibdir) || die
82
83 make DIST_ROOT=${BINDIR} \
84 DK_INC_DIR=${BINDIR}/usr/include/disk \
85 install install-dev \
86 || die
87
88 # we want compressed docs
89 rm -rf ${BINDIR}/usr/share/doc || die
90
91 # prune unneeded docs
92 rm doc/{CHANGES.gz,INSTALL,Makefile} || die
93
94 # sometime /var/tmp exist, remove it, to keep the right permissions
95 [[ -d ${BINDIR}/var ]] && rm -rf ${BINDIR}/var
96
97 minstalldocs doc/* || die
98 }