Magellan Linux

Contents of /trunk/core/coreutils/coreutils-8.17-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 12215 - (show annotations) (download)
Mon May 14 12:51:18 2012 UTC (12 years ago) by niro
File size: 2604 byte(s)
auto added: ver bump to 8.17-r1
1 # $Id$
2
3 PNAME="coreutils"
4 PVER="8.17"
5 PBUILD="r1"
6
7 PCAT="sys-apps"
8
9 DESCRIPTION="Standard GNU file utilities (chmod, cp, dd, dir, ls, etc)."
10 HOMEPAGE="http://www.gnu.org/software/coreutils/coreutils.html"
11
12 DEPEND=">= virtual/glibc
13 >= sys-libs/ncurses-5.9
14 >= dev-libs/gmp-5
15 >= sys-dev/gettext-0.18
16 >= sys-apps/acl-2.2
17 >= sys-apps/attr-2.4
18 >= sys-libs/libcap-2.22"
19
20 SDEPEND=">= sys-dev/automake-3
21 >= sys-dev/autoconf-4
22 >= sys-dev/m4-1.4"
23
24 SRCFILE="${PNAME}-${PVER}.tar.xz"
25 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
26
27 sminclude mtools
28
29 SRC_URI=(
30 gnu://${PNAME}/${SRCFILE}
31 mirror://${PNAME}/${SRCFILE}
32 mirror://${PNAME}/${PNAME}-5.94-more-dir-colors.patch
33 )
34
35 UP2DATE="updatecmd_gnu ${PNAME} xz"
36
37 src_prepare()
38 {
39 munpack ${SRCFILE} || die
40 cd ${SRCDIR}
41
42 # generic patches
43 mpatch ${PNAME}-5.94-more-dir-colors.patch || die
44
45 if [[ -z $(which cvs 2>/dev/null) ]]
46 then
47 # fix issues with gettext's autopoint if cvs is not installed
48 export AUTOPOINT="/bin/true"
49 fi
50 }
51
52 src_compile()
53 {
54 cd ${SRCDIR}
55
56 # ignore root check
57 FORCE_UNSAFE_CONFIGURE=1 \
58 mconfigure \
59 --libexecdir=/usr/$(mlibdir)/${PNAME} \
60 --enable-largefile \
61 --enable-nls \
62 --enable-acl \
63 --enable-xattr \
64 --enable-libcap \
65 --enable-install-program=arch \
66 || die
67
68 mmake || die
69 }
70
71 src_install()
72 {
73 cd ${SRCDIR}
74
75 # some needed directories
76 minstalldir /usr/bin || die
77 minstalldir /usr/sbin || die
78 minstalldir /bin || die
79 minstalldir /sbin || die
80
81 make DESTDIR=${BINDIR} install-root || die
82 make DESTDIR=${BINDIR} install || die
83
84 mv ${BINDIR}/usr/bin/arch ${BINDIR}/bin || die
85 mv ${BINDIR}/usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} ${BINDIR}/bin || die
86 mv ${BINDIR}/usr/bin/{dir,dircolors,du,date,echo,false,head} ${BINDIR}/bin || die
87 mv ${BINDIR}/usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} ${BINDIR}/bin || die
88
89 # small dirty fix, after move 'mv' will not be found anymore
90 mlink /bin/mv /usr/bin/mv || die
91
92 mv ${BINDIR}/usr/bin/{rm,rmdir,shred,sync,sleep,stty,test} ${BINDIR}/bin || die
93
94 mv ${BINDIR}/usr/bin/{touch,true,uname,vdir} ${BINDIR}/bin || die
95 mv ${BINDIR}/usr/bin/chroot ${BINDIR}/sbin || die
96
97 mlink test /bin/[ || die
98 mlink ../../bin/install /usr/bin || die
99
100 minstalldocs ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README THANKS TODO || die
101 }
102
103 preinstall()
104 {
105 if [[ ! -z $(magequery -n mktemp) ]]
106 then
107 echo -e ${COLRED}
108 echo -e "Error: sys-apps/mktemp is installed!!"
109 echo -e "mktemp is now provided by coreutils and doesn't need an extra package anymore."
110 echo -e "Please uninstall sys-apps/mktemp first!"
111 echo -e ${COLDEFAULT}
112 die "sys-apps/mktemp found!"
113 fi
114 }