Magellan Linux

Annotation of /branches/magellan-next/core/coreutils/coreutils-8.13-r2.smage2

Parent Directory Parent Directory | Revision Log Revision Log


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