summaryrefslogtreecommitdiff
path: root/emulators/suse121_linux/Makefile.common
blob: d90c1a339a9a27a085a4f5b91d0de11bab9b6629 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# $NetBSD: Makefile.common,v 1.13 2016/04/11 04:22:34 dbj Exp $
#
# used by emulators/suse121_alsa/Makefile
# used by emulators/suse121_aspell/Makefile
# used by emulators/suse121_base/Makefile
# used by emulators/suse121_compat/Makefile
# used by emulators/suse121_expat/Makefile
# used by emulators/suse121_fontconfig/Makefile
# used by emulators/suse121_freetype2/Makefile
# used by emulators/suse121_glx/Makefile
# used by emulators/suse121_gstreamer/Makefile
# used by emulators/suse121_gtk2/Makefile
# used by emulators/suse121_krb5/Makefile
# used by emulators/suse121_libcups/Makefile
# used by emulators/suse121_libcurl/Makefile
# used by emulators/suse121_libdrm/Makefile
# used by emulators/suse121_libgc/Makefile
# used by emulators/suse121_libjpeg/Makefile
# used by emulators/suse121_libpng/Makefile
# used by emulators/suse121_libsigc++2/Makefile
# used by emulators/suse121_libtiff/Makefile
# used by emulators/suse121_libxml2/Makefile
# used by emulators/suse121_locale/Makefile
# used by emulators/suse121_openmotif/Makefile
# used by emulators/suse121_openssl/Makefile
# used by emulators/suse121_qt4/Makefile
# used by emulators/suse121_slang/Makefile
# used by emulators/suse121_sqlite3/Makefile
# used by emulators/suse121_x11/Makefile
# used by meta-pkgs/suse121/Makefile

SUSE_PKG=		yes
SUSE_VERSION=		12.1
EMUL_REQD=		suse>=${SUSE_VERSION}

# The SuSE 12.x Linux packages are only usable on the following platforms.
# The SUSE_COMPAT32 packages are available only on x86_64 and they emulate i386.
# The non-SUSE_COMPAT32 packages are available on both i386 and x86_64
# and they emulate the corresponding linux platform.
.if !defined(SUSE_COMPAT32)
EMUL_PLATFORMS+=	linux-x86_64
ONLY_FOR_PLATFORM+=	NetBSD-5.99*-i386
ONLY_FOR_PLATFORM+=	NetBSD-[6-9]*-i386
.endif
EMUL_PLATFORMS+=	linux-i386
ONLY_FOR_PLATFORM+=	NetBSD-5.99*-x86_64
ONLY_FOR_PLATFORM+=	NetBSD-[6-9]*-x86_64

.include "../../mk/bsd.prefs.mk"

# _SUSE_ARCH.* is a table of ${EMUL_ARCH} to SuSE architectures.
_SUSE_ARCH.${EMUL_ARCH}=	${EMUL_ARCH}
_SUSE_ARCH.i386=		i586
_SUSE_ARCH=			${_SUSE_ARCH.${EMUL_ARCH}}
SUSE_ARCH=			${_SUSE_ARCH}

_SUSE_FTP_SUBDIR=	distribution/${SUSE_VERSION}/repo/oss/suse/
_SUSE_FTP_SUBDIR_UPD=	update/${SUSE_VERSION}/

MASTER_SITE_SUSE_${SUSE_VERSION}= \
	http://download.opensuse.org/${_SUSE_FTP_SUBDIR}

MASTER_SITE_SUSE_${SUSE_VERSION}_UPD= \
	http://download.opensuse.org/${_SUSE_FTP_SUBDIR_UPD}

MASTER_SITES?=		${MASTER_SITE_SUSE_${SUSE_VERSION}}/${SUSE_ARCH}/
DIST_SUBDIR?=		suse${SUSE_VERSION:S/.//}

HOMEPAGE?=		http://www.opensuse.org/

WRKSRC?=		${WRKDIR}
BUILD_DIRS?=		# empty
MANCOMPRESSED?=		yes

EMUL_PKG_FMT?=		rpm
RPM2PKG_PREFIX?=	${DESTDIR}${PREFIX}
RPM2PKG_SUBPREFIX?=	${EMULSUBDIR}
RPM2PKG_STAGE?=		do-install

SUSE_PKGSRCDIR=		${.CURDIR}/../${.CURDIR:T:S/_32_/_/}
FILESDIR=		${SUSE_PKGSRCDIR}/files
PATCHDIR=		${SUSE_PKGSRCDIR}/patches
PKGDIR=			${SUSE_PKGSRCDIR}

.if defined(SUSE_COMPAT32)
PKGNAME:=		${PKGNAME:S/^suse_/suse32_/}
COMMENT:=		${COMMENT:S/Linux/Linux 32-bit/}
.if defined(CONFLICTS)
CONFLICTS:=		${CONFLICTS:S/^suse_/suse32_/}
.endif
LINUX_BASE=		linux32
.else
LINUX_BASE=		linux
.endif
PLIST_SUBST+=		LINUX_BASE=${LINUX_BASE:Q}
FILES_SUBST+=		LINUX_BASE=${LINUX_BASE:Q}

LINUX_LIBSUBDIR?=	lib
PLIST_SUBST+=		LINUX_LIBSUBDIR=${LINUX_LIBSUBDIR:Q}
FILES_SUBST+=		LINUX_LIBSUBDIR=${LINUX_LIBSUBDIR:Q}

# Include an "override" SuSE-specific and architecture-specific
# Makefile fragment if it exists.
#
.sinclude "${SUSE_PKGSRCDIR}/suse.${EMUL_ARCH}.mk"

.if make(distinfo) || make(makedistinfo) || make(mdi) || make(makesum)
PKG_FAIL_REASON+=	"please use make emul-fetch or make emul-distinfo"
.endif

.if defined(RPMPKGS) && !empty(RPMPKGS)
.  for distfile in ${RPMPKGS}
DISTFILES+=	${distfile}.rpm
SITES.${distfile:T:S/=/--/}.rpm?=	\
	${MASTER_SITE_SUSE_${SUSE_VERSION}}${distfile:E}/
.  endfor
.endif
.if defined(RPMUPDPKGS) && !empty(RPMUPDPKGS)
.  for distfile in ${RPMUPDPKGS}
DISTFILES+=	${distfile}.rpm
SITES.${distfile:T:S/=/--/}.rpm?=	\
	${MASTER_SITE_SUSE_${SUSE_VERSION}_UPD}${distfile:E}/
.  endfor
.endif