pkgsrc/emulators/suse_linux/Makefile.common
joerg 1f6a39a84e First step at reworking Linux binary packages.
Change most pkgs to depend on either
emulators/suse_linux/Makefile.application (normal pkgs) or
Makefile.common (suse91 and suse themselves) to filter out Operating
Systems without Linux ABI support. Use CPU masks to limit the pkg to
supported platforms.
2005-12-12 14:43:23 +00:00

64 lines
2 KiB
Makefile

# $NetBSD: Makefile.common,v 1.22 2005/12/12 14:43:25 joerg Exp $
.include "../../emulators/suse_linux/vars.mk"
.include "../../emulators/suse_linux/arch.mk"
ONLY_FOR_PLATFORM= NetBSD-1.5Z[C-Z]-i386 NetBSD-1.6*-i386
ONLY_FOR_PLATFORM+= NetBSD-[2-9]*-i386
ONLY_FOR_PLATFORM+= NetBSD-1.6[L-Z]-powerpc NetBSD-1.6Z[A-Z]-powerpc
ONLY_FOR_PLATFORM+= NetBSD-[2-9]*-powerpc
ONLY_FOR_PLATFORM+= FreeBSD-*-i386
ONLY_FOR_PLATFORM+= DragonFly-*-i386
MASTER_SITE_SUSE?= ftp://ftp.suse.com/pub/suse/discontinued/${SUSE_ARCH}/${SUSE_VERSION}/suse/
# ftp://ftp.gwdg.de/pub/linux/suse/ftp.suse.com/suse/discontinued/${SUSE_ARCH}/${SUSE_VERSION}/suse/
# ftp://gd.tuwien.ac.at/linux/suse.com/suse/discontinued/${SUSE_ARCH}/${SUSE_VERSION}/suse/
MASTER_SITE_SUSE_UPD= ${MASTER_SITE_SUSE:S/${SUSE_VERSION}\/suse/update\/${SUSE_VERSION}/}
DIST_SUBDIR?= suse${SUSE_VERSION:S/.//}/${SUSE_ARCH}
WRKSRC?= ${WRKDIR}
MANCOMPRESSED?= yes
EMULSUBDIR= emul/linux
EMULDIR= ${PREFIX}/${EMULSUBDIR}
RPM2PKG= ${PREFIX}/sbin/rpm2pkg
BUILD_DEPENDS+= rpm2pkg>=2.1:../../pkgtools/rpm2pkg
BUILD_DEFS+= RPMFILES
.if defined(RPMIGNOREPATH)
BUILD_DEFS+= RPMIGNOREPATH
.endif
# The SuSE Linux packages have circular dependencies.
LDD?= ${TRUE}
RPM2PKGARGS?= -d ${PREFIX} -f ${PLIST_SRC} -p ${EMULSUBDIR}
.for TEMP in ${RPMIGNOREPATH}
RPM2PKGARGS+= -i ${TEMP}
.endfor
.for TEMP in ${RPMFILES}
RPM2PKGARGS+= ${DISTDIR}/${DIST_SUBDIR}/${TEMP}
.endfor
.if !target(do-install)
do-install:
@if [ -f ${PKGDIR}/PLIST ]; then \
${CP} ${PKGDIR}/PLIST ${PLIST_SRC}; \
else \
${RM} -f ${PLIST_SRC}; \
${CP} ${PKGSRCDIR}/emulators/suse_linux/PLIST_dynamic ${PLIST_SRC} ; \
fi
${RPM2PKG} ${RPM2PKGARGS}
@if ${GREP} -q 'lib.*\.so' ${PLIST_SRC}; then \
${ECHO_MSG} "===> [Automatic Linux shared object handling]"; \
${EMULDIR}/sbin/ldconfig -r ${EMULDIR}; \
${ECHO} "@exec %D/${EMULSUBDIR}/sbin/ldconfig -r %D/${EMULSUBDIR}" >>${PLIST_SRC}; \
${ECHO} "@unexec %D/${EMULSUBDIR}/sbin/ldconfig -r %D/${EMULSUBDIR} 2>/dev/null" >>${PLIST_SRC}; \
fi
.endif
show-shlib-type:
@${ECHO} linux-${MACHINE_ARCH}