Magellan Linux

Contents of /branches/magellan-next/core/coreutils/coreutils-8.13-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9025 - (show annotations) (download)
Mon Oct 3 11:57:08 2011 UTC (12 years, 7 months ago) by niro
File size: 2371 byte(s)
auto added: ver bump to 8.13-r1
1 # $Id$
2
3 PNAME="coreutils"
4 PVER="8.13"
5 PBUILD="r1"
6
7 PCATEGORIE="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
19 SDEPEND=">= sys-dev/automake-3
20 >= sys-dev/autoconf-4
21 >= sys-dev/m4-1.4"
22
23 SRCFILE="${PNAME}-${PVER}.tar.gz"
24 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
25
26 sminclude mtools
27
28 SRC_URI=(
29 gnu://${PNAME}/${SRCFILE}
30 mirror://${PNAME}/${SRCFILE}
31 mirror://${PNAME}/${PNAME}-5.94-more-dir-colors.patch
32 )
33
34 UP2DATE="updatecmd_gnu ${PNAME} gz"
35
36 src_prepare()
37 {
38 munpack ${SRCFILE} || die
39 cd ${SRCDIR}
40
41 # generic patches
42 mpatch ${PNAME}-5.94-more-dir-colors.patch || die
43
44 if [[ -z $(which cvs 2>/dev/null) ]]
45 then
46 # fix issues with gettext's autopoint if cvs is not installed
47 export AUTOPOINT="/bin/true"
48 fi
49 }
50
51 src_compile()
52 {
53 cd ${SRCDIR}
54
55 mconfigure --enable-largefile --enable-nls --enable-acl --enable-xattr || die
56 mmake || die
57 }
58
59 src_install()
60 {
61 cd ${SRCDIR}
62
63 # some needed directories
64 minstalldir /usr/bin || die
65 minstalldir /usr/sbin || die
66 minstalldir /bin || die
67 minstalldir /sbin || die
68
69 make DESTDIR=${BINDIR} install-root || die
70 make DESTDIR=${BINDIR} install || die
71
72 mv ${BINDIR}/usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} ${BINDIR}/bin || die
73 mv ${BINDIR}/usr/bin/{dir,dircolors,du,date,echo,false,head} ${BINDIR}/bin || die
74 mv ${BINDIR}/usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} ${BINDIR}/bin || die
75
76 # small dirty fix, after move 'mv' will not be found anymore
77 mlink /bin/mv /usr/bin/mv || die
78
79 mv ${BINDIR}/usr/bin/{rm,rmdir,shred,sync,sleep,stty,test} ${BINDIR}/bin || die
80
81 mv ${BINDIR}/usr/bin/{touch,true,uname,vdir} ${BINDIR}/bin || die
82 mv ${BINDIR}/usr/bin/chroot ${BINDIR}/sbin || die
83
84 mlink test /bin/[ || die
85 mlink ../../bin/install /usr/bin || die
86
87 minstalldocs ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README THANKS TODO || die
88 }
89
90 preinstall()
91 {
92 if [[ ! -z $(magequery -n mktemp) ]]
93 then
94 echo -e ${COLRED}
95 echo -e "Error: sys-apps/mktemp is installed!!"
96 echo -e "mktemp is now provided by coreutils and doesn't need an extra package anymore."
97 echo -e "Please uninstall sys-apps/mktemp first!"
98 echo -e ${COLDEFAULT}
99 die "sys-apps/mktemp found!"
100 fi
101 }