Magellan Linux

Contents of /smage/trunk/core/coreutils/coreutils-7.6-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 40 - (show annotations) (download)
Sun Jan 3 22:31:17 2010 UTC (14 years, 3 months ago) by niro
File size: 3420 byte(s)
-splitpackage
1 # $Id$
2
3 PNAME="coreutils"
4 PVER="7.6"
5 PBUILD="r3"
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-4.3
16 # >= sys-dev/gettext-0.17"
17
18 SDEPEND=">= sys-dev/automake-3
19 >= sys-dev/autoconf-4
20 >= sys-dev/m4-1.4
21 >= virtual/glibc
22 >= sys-libs/ncurses-5.7
23 >= dev-libs/gmp-4.3
24 >= sys-dev/gettext-0.17"
25
26 SRCFILE="${PNAME}-${PVER}.tar.gz"
27 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
28
29 sminclude mtools mcore-split
30
31 SRC_URI=(
32 gnu://${PNAME}/${SRCFILE}
33 mirror://${PNAME}/${SRCFILE}
34 mirror://${PNAME}/patches-${PVER}/${PNAME}-5.3.0-dumbterm.patch
35 mirror://${PNAME}/patches-${PVER}/${PNAME}-5.3.0-mem.patch
36 mirror://${PNAME}/patches-${PVER}/${PNAME}-5.3.0-uname.patch
37 mirror://${PNAME}/patches-${PVER}/${PNAME}-5.94-more-dir-colors.patch
38 )
39
40 UP2DATE="updatecmd_gnu ${PNAME} gz"
41
42 src_prepare()
43 {
44 munpack ${SRCFILE} || die
45 cd ${SRCDIR}
46
47 # mandrake patches
48 mpatch ${PNAME}-5.3.0-dumbterm.patch || die
49 mpatch ${PNAME}-5.3.0-mem.patch || die
50
51 # generic patches
52 mpatch ${PNAME}-5.3.0-uname.patch || die
53 mpatch ${PNAME}-5.94-more-dir-colors.patch || die
54
55 # fix compilation with newer versions of glibc
56 sed -i "s/futimens/gl_&/" $(grep -lr futimens *) || die
57
58 if [[ -z $(which cvs 2>/dev/null) ]]
59 then
60 # fix issues with gettext's autopoint if cvs is not installed
61 export AUTOPOINT="/bin/true"
62 fi
63
64 export WANT_AUTOMAKE=1.11
65 export WANT_AUTOCONF=2.5
66 aclocal -I m4 &>/dev/null || die
67 autoconf || die
68 automake || die
69 }
70
71 src_compile()
72 {
73 cd ${SRCDIR}
74
75 mconfigure --enable-largefile --enable-nls --disable-acl --disable-xattr || die
76 mmake || die
77 }
78
79 generic_src_install()
80 {
81 cd ${SRCDIR}
82
83 # some needed directories
84 minstalldir /usr/bin || die
85 minstalldir /usr/sbin || die
86 minstalldir /bin || die
87 minstalldir /sbin || die
88
89 make DESTDIR=${BINDIR} install-root || die
90 make DESTDIR=${BINDIR} install || die
91
92 mv ${BINDIR}/usr/bin/{basename,cat,chgrp,chmod,chown,cp,dd,df} ${BINDIR}/bin || die
93 mv ${BINDIR}/usr/bin/{dir,dircolors,du,date,echo,false,head} ${BINDIR}/bin || die
94 mv ${BINDIR}/usr/bin/{install,ln,ls,mkdir,mkfifo,mknod,mv,pwd} ${BINDIR}/bin || die
95
96 # small dirty fix, after move 'mv' will not be found anymore
97 mlink /bin/mv /usr/bin/mv || die
98
99 mv ${BINDIR}/usr/bin/{rm,rmdir,shred,sync,sleep,stty,test} ${BINDIR}/bin || die
100
101 mv ${BINDIR}/usr/bin/{touch,true,uname,vdir} ${BINDIR}/bin || die
102 mv ${BINDIR}/usr/bin/chroot ${BINDIR}/sbin || die
103
104 mlink test /bin/[ || die
105 mlink ../../bin/install /usr/bin || die
106
107 minstalldocs ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README THANKS TODO || die
108 }
109
110 src_install_coreutils()
111 {
112 src_install_generic
113
114 # cleanup
115 zapmost ${BINDIR} bin/dircolors bin/install bin/ls usr/bin/mktemp bin/touch || die
116 }
117
118 src_install_coreutils_dev()
119 {
120 src_install_generic
121
122 # cleanup
123 rm ${BINDIR}/bin/dircolors || die
124 rm ${BINDIR}/bin/install || die
125 rm ${BINDIR}/bin/ls || die
126 rm ${BINDIR}/usr/bin/mktemp || die
127 rm ${BINDIR}/bin/touch || die
128 }
129
130 preinstall()
131 {
132 if [[ ! -z $(magequery -n mktemp) ]]
133 then
134 echo -e ${COLRED}
135 echo -e "Error: sys-apps/mktemp is installed!!"
136 echo -e "mktemp is now provided by coreutils and doesn't need an extra package anymore."
137 echo -e "Please uninstall sys-apps/mktemp first!"
138 echo -e ${COLDEFAULT}
139 die "sys-apps/mktemp found!"
140 fi
141 }

Properties

Name Value
svn:keywords Id