Magellan Linux

Annotation of /branches/magellan-next/core/coreutils/coreutils-8.15-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9760 - (hide annotations) (download)
Tue Jan 10 16:32:49 2012 UTC (12 years, 4 months ago) by niro
File size: 2516 byte(s)
-remove duplicate line
1 niro 9758 # $Id$
2    
3     PNAME="coreutils"
4     PVER="8.15"
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.xz"
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} xz"
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 \
56     --libexecdir=/usr/$(mlibdir)/${PNAME} \
57     --enable-largefile \
58     --enable-nls \
59     --enable-acl \
60     --enable-xattr \
61     --enable-install-program=arch \
62     || die
63    
64     mmake || die
65     }
66    
67     src_install()
68     {
69     cd ${SRCDIR}
70    
71     # some needed directories
72     minstalldir /usr/bin || die
73     minstalldir /usr/sbin || die
74     minstalldir /bin || die
75     minstalldir /sbin || die
76    
77     make DESTDIR=${BINDIR} install-root || die
78     make DESTDIR=${BINDIR} install || die
79    
80 niro 9759 mv ${BINDIR}/usr/bin/arch ${BINDIR}/bin || die
81 niro 9758 mv ${BINDIR}/usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} ${BINDIR}/bin || die
82     mv ${BINDIR}/usr/bin/{dir,dircolors,du,date,echo,false,head} ${BINDIR}/bin || die
83     mv ${BINDIR}/usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} ${BINDIR}/bin || die
84    
85     # small dirty fix, after move 'mv' will not be found anymore
86     mlink /bin/mv /usr/bin/mv || die
87    
88     mv ${BINDIR}/usr/bin/{rm,rmdir,shred,sync,sleep,stty,test} ${BINDIR}/bin || die
89    
90     mv ${BINDIR}/usr/bin/{touch,true,uname,vdir} ${BINDIR}/bin || die
91     mv ${BINDIR}/usr/bin/chroot ${BINDIR}/sbin || die
92    
93     mlink test /bin/[ || die
94     mlink ../../bin/install /usr/bin || die
95    
96     minstalldocs ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README THANKS TODO || die
97     }
98    
99     preinstall()
100     {
101     if [[ ! -z $(magequery -n mktemp) ]]
102     then
103     echo -e ${COLRED}
104     echo -e "Error: sys-apps/mktemp is installed!!"
105     echo -e "mktemp is now provided by coreutils and doesn't need an extra package anymore."
106     echo -e "Please uninstall sys-apps/mktemp first!"
107     echo -e ${COLDEFAULT}
108     die "sys-apps/mktemp found!"
109     fi
110     }