Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7358 - (show annotations) (download)
Tue Jan 11 17:08:18 2011 UTC (13 years, 4 months ago) by niro
File size: 2444 byte(s)
auto added: ver bump to 8.9-r1
1 # $Id: coreutils-7.6-r3.smage2 3616 2009-10-27 13:57:05Z niro $
2
3 PNAME="coreutils"
4 PVER="8.9"
5 PBUILD="r1"
6
7 PCATEGORIE="sys-apps"
8 STATE="unstable"
9
10 DESCRIPTION="Standard GNU file utilities (chmod, cp, dd, dir, ls, etc)."
11 HOMEPAGE="http://www.gnu.org/software/coreutils/coreutils.html"
12
13 DEPEND=">= virtual/glibc
14 >= sys-libs/ncurses-5.7
15 >= dev-libs/gmp-5
16 >= sys-dev/gettext-0.18
17 >= sys-apps/acl-2.2
18 >= sys-apps/attr-2.4"
19
20 SDEPEND=">= sys-dev/automake-3
21 >= sys-dev/autoconf-4
22 >= sys-dev/m4-1.4"
23
24 SRCFILE="${PNAME}-${PVER}.tar.gz"
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} gz"
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 mconfigure --enable-largefile --enable-nls --enable-acl --enable-xattr || die
57 mmake || die
58 }
59
60 src_install()
61 {
62 cd ${SRCDIR}
63
64 # some needed directories
65 minstalldir /usr/bin || die
66 minstalldir /usr/sbin || die
67 minstalldir /bin || die
68 minstalldir /sbin || die
69
70 make DESTDIR=${BINDIR} install-root || die
71 make DESTDIR=${BINDIR} install || die
72
73 mv ${BINDIR}/usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} ${BINDIR}/bin || die
74 mv ${BINDIR}/usr/bin/{dir,dircolors,du,date,echo,false,head} ${BINDIR}/bin || die
75 mv ${BINDIR}/usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} ${BINDIR}/bin || die
76
77 # small dirty fix, after move 'mv' will not be found anymore
78 mlink /bin/mv /usr/bin/mv || die
79
80 mv ${BINDIR}/usr/bin/{rm,rmdir,shred,sync,sleep,stty,test} ${BINDIR}/bin || die
81
82 mv ${BINDIR}/usr/bin/{touch,true,uname,vdir} ${BINDIR}/bin || die
83 mv ${BINDIR}/usr/bin/chroot ${BINDIR}/sbin || die
84
85 mlink test /bin/[ || die
86 mlink ../../bin/install /usr/bin || die
87
88 minstalldocs ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README THANKS TODO || die
89 }
90
91 preinstall()
92 {
93 if [[ ! -z $(magequery -n mktemp) ]]
94 then
95 echo -e ${COLRED}
96 echo -e "Error: sys-apps/mktemp is installed!!"
97 echo -e "mktemp is now provided by coreutils and doesn't need an extra package anymore."
98 echo -e "Please uninstall sys-apps/mktemp first!"
99 echo -e ${COLDEFAULT}
100 die "sys-apps/mktemp found!"
101 fi
102 }