# Programa: COREUTILS # Descripció: The GNU Core Utilities are the basic file, shell and text manipulation utilities # Autor Makefile: Sergi Coll (http://www.sim00.net/) # Web: http://www.gnu.org/software/coreutils/ # Nota: Previously these utilities were offered as three individual sets of GNU utilities, fileutils, shellutils, and textutils. FITXER=http://ftp.gnu.org/pub/gnu/coreutils/coreutils-5.0.tar.bz2 include /dades/home/sergi/devel/simlinux-0.1/makefiles/simlinux_vars.inc VER=5.0 PAQUET=coreutils DIR=${PAQUET}-${VER} TAR=${DIR}.tar.bz2 PREFIX=/usr OPTS_CONFIGURE=--prefix=${PREFIX} OPTS_MAKE= OPTS_MAKE_INSTALL=prefix=${DISTRODIR}${PREFIX} # -------------------------------------------------------------------- all: get untar configure make install strip uninstall_paquet paquetdistro get: ${TAR} ${TAR}: wget ${FITXER} untar: tar jxvf ${TAR} configure: ( cd ${DIR} && ./configure ${OPTS_CONFIGURE}) make: ( cd ${DIR} && ${MAKE} ${OPTS_MAKE} ) @echo Per instalar, pica: su -c \"make -f ${PAQUET}.mk install\" install: ( cd ${DIR} && ${MAKE} ${OPTS_MAKE_INSTALL} install ) mkdir -p ${DISTRODIR}/bin/ ln -s /usr/bin/cat ${DISTRODIR}/bin/cat ln -s /usr/bin/true ${DISTRODIR}/bin/true @echo Per borrar ${TAR} i ${DIR}/, pica: make -f ${PAQUET}.mk remove clean: ( cd ${DIR} && ${MAKE} clean && ${MAKE} distclean) remove: rm -fr ${DIR} rm -fr ${TAR} uninstall: ( cd ${DIR} && ${MAKE} uninstall ) rm -fr ${DIR} rm -fr ${TAR} strip: find ${DISTRODIR} -exec strip -g --strip-unneeded {} \; uninstall_paquet: mkdir -p ${DISTRODIR}/simlinux/uninstall cd ${DISTRODIR} && find . >/tmp/simlinux.tmp mv /tmp/simlinux.tmp ${DISTRODIR}/simlinux/uninstall/uninstall_${DIR} paquetdistro: mkdir -p ${DISTRODIR} mkdir -p ${DISTROPAQUETS} ( cd ${DISTRODIR} && tar jcvf ${DISTROPAQUETS}/${DIR}.tar.bz2 --totals .) rm -rf ${DISTRODIR}/*