summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorchristos <christos@pkgsrc.org>1999-06-23 17:06:20 +0000
committerchristos <christos@pkgsrc.org>1999-06-23 17:06:20 +0000
commit160cc155fb7dec0dd226f8a2f7b497a6e562371a (patch)
tree477fe7589cc9007c3d72efb6f3ec7e935fe36b33 /mk
parentcd81798b2f58d3e6dae9d587a501ccedce4ba6e8 (diff)
downloadpkgsrc-160cc155fb7dec0dd226f8a2f7b497a6e562371a.tar.gz
Linux bits; now the package system works on Linux too.
Diffstat (limited to 'mk')
-rw-r--r--mk/Linux.pkg.dist205
-rw-r--r--mk/Linux.x11.dist287
-rw-r--r--mk/bsd.pkg.mk91
-rw-r--r--mk/bsd.prefs.mk28
4 files changed, 575 insertions, 36 deletions
diff --git a/mk/Linux.pkg.dist b/mk/Linux.pkg.dist
new file mode 100644
index 00000000000..e838b7a15bc
--- /dev/null
+++ b/mk/Linux.pkg.dist
@@ -0,0 +1,205 @@
+# Id: BSD.local.dist,v 1.30 1997/08/01 13:16:39 phk Exp
+# $NetBSD: Linux.pkg.dist,v 1.1 1999/06/23 17:06:20 christos Exp $
+#
+
+/set type=dir uname=root gname=sys mode=0755
+.
+ bin
+ ..
+ emul
+ ..
+ etc
+ rc.d
+ ..
+ ..
+ include
+ ..
+ info
+ ..
+ lib
+ ..
+ libdata
+ tcl
+ ..
+ ..
+ libexec
+ ..
+ man
+ cat1
+ ..
+ cat2
+ ..
+ cat3
+ ..
+ cat4
+ ..
+ cat5
+ ..
+ cat6
+ ..
+ cat7
+ ..
+ cat8
+ ..
+ cat9
+ ..
+ catl
+ ..
+ catn
+ ..
+ ja_JP.EUC
+ cat1
+ ..
+ cat2
+ ..
+ cat3
+ ..
+ cat4
+ ..
+ cat5
+ ..
+ cat6
+ ..
+ cat7
+ ..
+ cat8
+ ..
+ cat9
+ ..
+ catl
+ ..
+ catn
+ ..
+ man1
+ ..
+ man2
+ ..
+ man3
+ ..
+ man4
+ ..
+ man5
+ ..
+ man6
+ ..
+ man7
+ ..
+ man8
+ ..
+ man9
+ ..
+ manl
+ ..
+ mann
+ ..
+ ..
+ man1
+ ..
+ man2
+ ..
+ man3
+ ..
+ man4
+ ..
+ man5
+ ..
+ man6
+ ..
+ man7
+ ..
+ man8
+ ..
+ man9
+ ..
+ manl
+ ..
+ mann
+ ..
+ ..
+ sbin
+ ..
+ share
+ aclocal
+ ..
+ dict
+ ..
+ doc
+ ..
+ examples
+ ..
+ games
+ ..
+ locale
+ ..
+ misc
+ ..
+ nls
+ C
+ ..
+ da_DK.ISO_8859-1
+ ..
+ de_AT.ISO_8859-1
+ ..
+ de_CH.ISO_8859-1
+ ..
+ de_DE.ISO_8859-1
+ ..
+ el_GR.ISO_8859-7
+ ..
+ en_AU.ISO_8859-1
+ ..
+ en_CA.ISO_8859-1
+ ..
+ en_GB.ISO_8859-1
+ ..
+ en_US.ISO_8859-1
+ ..
+ es_ES.ISO_8859-1
+ ..
+ fi_FI.ISO_8859-1
+ ..
+ fr_BE.ISO_8859-1
+ ..
+ fr_CA.ISO_8859-1
+ ..
+ fr_CH.ISO_8859-1
+ ..
+ fr_FR.ISO_8859-1
+ ..
+ hr_HR.ISO_8859-2
+ ..
+ is_IS.ISO_8859-1
+ ..
+ it_CH.ISO_8859-1
+ ..
+ it_IT.ISO_8859-1
+ ..
+ ja_JP.EUC
+ ..
+ ko_KR.EUC
+ ..
+ lt_LN.ASCII
+ ..
+ lt_LN.ISO_8859-1
+ ..
+ lt_LN.ISO_8859-2
+ ..
+ nl_BE.ISO_8859-1
+ ..
+ nl_NL.ISO_8859-1
+ ..
+ no_NO.ISO_8859-1
+ ..
+ pt_PT.ISO_8859-1
+ ..
+ ru_SU.CP866
+ ..
+ ru_SU.KOI8-R
+ ..
+ sv_SE.ISO_8859-1
+ ..
+ ..
+ skel
+ ..
+ ..
+..
diff --git a/mk/Linux.x11.dist b/mk/Linux.x11.dist
new file mode 100644
index 00000000000..fd841e28a0a
--- /dev/null
+++ b/mk/Linux.x11.dist
@@ -0,0 +1,287 @@
+# $NetBSD: Linux.x11.dist,v 1.1 1999/06/23 17:06:20 christos Exp $
+# FreeBSD Id: BSD.x11.dist,v 1.2 1997/06/10 07:55:10 asami Exp
+#
+
+/set type=dir uname=root gname=sys mode=0755
+.
+ bin
+ ..
+ etc
+ rc.d
+ ..
+ ..
+ include
+ X11
+ ICE
+ ..
+ PEX5
+ ..
+ PM
+ ..
+ SM
+ ..
+ Xaw
+ ..
+ Xmu
+ ..
+ bitmaps
+ ..
+ extensions
+ ..
+ fonts
+ ..
+ pixmaps
+ ..
+ ..
+ ..
+ info
+ ..
+ lib
+ X11
+ XF86Setup
+ pics
+ ..
+ scripts
+ ..
+ tcllib
+ ..
+ ..
+ app-defaults
+ ..
+ config
+ ..
+ doc
+ ..
+ etc
+ ..
+ fonts
+ 100dpi
+ ..
+ 75dpi
+ ..
+ PEX
+ ..
+ Speedo
+ ..
+ Type1
+ ..
+ cyrillic
+ ..
+ misc
+ ..
+ ..
+ fs
+ ..
+ lbxproxy
+ ..
+ locale
+ C
+ ..
+ en_US.utf
+ ..
+ iso8859-1
+ ..
+ iso8859-2
+ ..
+ iso8859-3
+ ..
+ iso8859-4
+ ..
+ iso8859-5
+ ..
+ iso8859-6
+ ..
+ iso8859-7
+ ..
+ iso8859-8
+ ..
+ iso8859-9
+ ..
+ ja
+ ..
+ ja.JIS
+ ..
+ ja.SJIS
+ ..
+ ko
+ ..
+ koi8-r
+ ..
+ tbl_data
+ ..
+ th_TH.TACTIS
+ ..
+ zh
+ ..
+ zh_TW
+ ..
+ ..
+ proxymngr
+ ..
+ rstart
+ commands
+ x11r6
+ ..
+ ..
+ contexts
+ ..
+ ..
+ twm
+ ..
+ x11perfcomp
+ ..
+ xdm
+ ..
+ xinit
+ ..
+ xkb
+ compat
+ ..
+ compiled
+ ..
+ geometry
+ digital
+ ..
+ sgi
+ ..
+ ..
+ keycodes
+ digital
+ ..
+ sgi
+ ..
+ ..
+ keymap
+ digital
+ ..
+ sgi
+ ..
+ sun
+ ..
+ ..
+ rules
+ ..
+ semantics
+ ..
+ symbols
+ digital
+ ..
+ fujitsu
+ ..
+ nec
+ ..
+ sony
+ ..
+ sun
+ ..
+ ..
+ ..
+ xserver
+ ..
+ xsm
+ ..
+ ..
+ modules
+ ..
+ ..
+ libexec
+ ..
+ man
+ cat1
+ ..
+ cat2
+ ..
+ cat3
+ ..
+ cat4
+ ..
+ cat5
+ ..
+ cat6
+ ..
+ cat7
+ ..
+ cat8
+ ..
+ cat9
+ ..
+ catl
+ ..
+ catn
+ ..
+ ja_JP.EUC
+ cat1
+ ..
+ cat2
+ ..
+ cat3
+ ..
+ cat4
+ ..
+ cat5
+ ..
+ cat6
+ ..
+ cat7
+ ..
+ cat8
+ ..
+ cat9
+ ..
+ catl
+ ..
+ catn
+ ..
+ man1
+ ..
+ man2
+ ..
+ man3
+ ..
+ man4
+ ..
+ man5
+ ..
+ man6
+ ..
+ man7
+ ..
+ man8
+ ..
+ man9
+ ..
+ manl
+ ..
+ mann
+ ..
+ ..
+ man1
+ ..
+ man2
+ ..
+ man3
+ ..
+ man4
+ ..
+ man5
+ ..
+ man6
+ ..
+ man7
+ ..
+ man8
+ ..
+ man9
+ ..
+ manl
+ ..
+ mann
+ ..
+ ..
+ share
+ doc
+ ..
+ examples
+ ..
+ ..
+..
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index ac69a294e03..6433481a8b5 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.282 1999/06/14 01:56:52 hubertf Exp $
+# $NetBSD: bsd.pkg.mk,v 1.283 1999/06/23 17:06:21 christos Exp $
#
# This file is in the public domain.
#
@@ -50,6 +50,9 @@ X11BASE?= ${DESTDIR}/usr/openwin
.elif (${OPSYS} == "OpenBSD")
DEF_UMASK?= 022
NOMANCOMPRESS?= yes
+.elif (${OPSYS} == "Linux")
+DEF_UMASK?= 022
+NOMANCOMPRESS?= yes
.endif
DEF_UMASK?= 0022
@@ -164,14 +167,8 @@ FETCH_CMD?= /usr/bin/ftp
# By default, distfiles have no restrictions placed on them
MIRROR_DISTFILE?= yes
-TOUCH?= /usr/bin/touch
TOUCH_FLAGS?= -f
-.if (${OPSYS} == "SunOS")
-PATCH?= ${LOCALBASE}/bin/patch -b
-.else
-PATCH?= /usr/bin/patch
-.endif
PATCH_STRIP?= -p0
PATCH_DIST_STRIP?= -p0
.if defined(PATCH_DEBUG) || defined(PKG_VERBOSE)
@@ -220,7 +217,7 @@ EXTRACT_ELEMENTS?=
.if defined(EXTRACT_USING_PAX)
EXTRACT_CMD?= (${DECOMPRESS_CMD} ${DOWNLOADED_DISTFILE} ; dd if=/dev/zero bs=10k count=2) | ${PAX} -r ${EXTRACT_ELEMENTS}
.else
-EXTRACT_CMD?= ${DECOMPRESS_CMD} ${DOWNLOADED_DISTFILE} | /usr/bin/tar xf - ${EXTRACT_ELEMENTS}
+EXTRACT_CMD?= ${DECOMPRESS_CMD} ${DOWNLOADED_DISTFILE} | ${GTAR} xf - ${EXTRACT_ELEMENTS}
.endif
# Figure out where the local mtree file is
@@ -232,11 +229,6 @@ MTREE_FILE= ${PKGSRCDIR}/mk/${OPSYS}.pkg.dist
.endif
.endif # ! MTREE_FILE
-.if (${OPSYS} == "SunOS")
-MTREE_CMD?= ${LOCALBASE}/bsd/bin/mtree
-.else
-MTREE_CMD?= /usr/sbin/mtree
-.endif
MTREE_ARGS?= -U -f ${MTREE_FILE} -d -e -p
# Debugging levels for this file, dependent on PKG_DEBUG_LEVEL definition
@@ -350,18 +342,6 @@ MESSAGE_FILE= ${PKGDIR}/MESSAGE
BUILD_VERSION_FILE= ${WRKDIR}/BuildVersion
BUILD_INFO_FILE= ${WRKDIR}/BuildInfo
-.if (${OPSYS} == "SunOS")
-PKG_ADD?= ${LOCALBASE}/bsd/bin/pkg_add
-PKG_CREATE?= ${LOCALBASE}/bsd/bin/pkg_create
-PKG_DELETE?= ${LOCALBASE}/bsd/bin/pkg_delete
-PKG_INFO?= ${LOCALBASE}/bsd/bin/pkg_info
-.else
-PKG_ADD?= /usr/sbin/pkg_add
-PKG_CREATE?= /usr/sbin/pkg_create
-PKG_DELETE?= /usr/sbin/pkg_delete
-PKG_INFO?= /usr/sbin/pkg_info
-.endif
-
.ifndef PKG_ARGS
PKG_ARGS= -v -c ${COMMENT} -d ${DESCR} -f ${PLIST} -l
PKG_ARGS+= -b ${BUILD_VERSION_FILE} -B ${BUILD_INFO_FILE}
@@ -415,8 +395,14 @@ IDENT?= ${LOCALBASE}/bin/ident
LDCONFIG?= /usr/bin/true
LN?= /usr/bin/ln
MKDIR?= /usr/bin/mkdir -p
+MTREE?= ${LOCALBASE}/bsd/bin/mtree
MV?= /usr/bin/mv
+PATCH?= ${LOCALBASE}/bin/patch -b
PAX?= /bin/pax
+PKG_ADD?= ${LOCALBASE}/bsd/bin/pkg_add
+PKG_CREATE?= ${LOCALBASE}/bsd/bin/pkg_create
+PKG_DELETE?= ${LOCALBASE}/bsd/bin/pkg_delete
+PKG_INFO?= ${LOCALBASE}/bsd/bin/pkg_info
RM?= /usr/bin/rm
RMDIR?= /usr/bin/rmdir
SED?= /usr/bin/sed
@@ -425,9 +411,53 @@ SH?= /bin/ksh
SU?= /usr/bin/su
TAIL?= /usr/xpg4/bin/tail
TEST?= /usr/bin/test
+TOUCH?= /usr/bin/touch
TR?= /usr/bin/tr
TRUE?= /usr/bin/true
TYPE?= /usr/bin/type
+.elif (${OPSYS} == "Linux")
+AWK?= /usr/bin/awk
+BASENAME?= /bin/basename
+CAT?= /bin/cat
+CHMOD?= /bin/chmod
+CHOWN?= /usr/sbin/chown
+CHGRP?= /usr/bin/chgrp
+CP?= /bin/cp
+ECHO?= /bin/echo
+EGREP?= /bin/egrep
+FALSE?= /usr/false
+FILE?= /usr/bin/file
+GREP?= /usr/grep
+GTAR?= /bin/tar
+GUNZIP_CMD?= /usr/bin/gunzip -f
+GZCAT?= /bin/zcat
+GZIP?= -9
+GZIP_CMD?= /usr/bin/gzip -nf ${GZIP}
+ID?= /usr/bin/id
+IDENT?= /usr/bin/ident
+LDCONFIG?= /sbin/ldconfig
+LN?= /bin/ln
+MKDIR?= /bin/mkdir -p
+MTREE?= ${LOCALBASE}/bsd/bin/mtree
+MV?= /bin/mv
+PATCH?= /usr/bin/patch
+PAX?= /usr/local/bsd/bin/pax
+PKG_ADD?= ${LOCALBASE}/bsd/bin/pkg_add
+PKG_CREATE?= ${LOCALBASE}/bsd/bin/pkg_create
+PKG_DELETE?= ${LOCALBASE}/bsd/bin/pkg_delete
+PKG_INFO?= ${LOCALBASE}/bsd/bin/pkg_info
+RM?= /bin/rm
+RMDIR?= /bin/rmdir
+SED?= /bin/sed
+SETENV?= /usr/bin/env
+SH?= /bin/sh
+SU?= /bin/su
+TAIL?= /usr/bin/tail
+TEST?= /bin/test
+TOUCH?= /bin/touch
+TR?= /usr/bin/tr
+TRUE?= /bin/true
+TYPE?= type
.else
AWK?= /usr/bin/awk
BASENAME?= /usr/bin/basename
@@ -451,8 +481,14 @@ IDENT?= /usr/bin/ident
LDCONFIG?= /sbin/ldconfig
LN?= /bin/ln
MKDIR?= /bin/mkdir -p
+MTREE?= /usr/sbin/mtree
MV?= /bin/mv
+PATCH?= /usr/bin/patch
PAX?= /bin/pax
+PKG_ADD?= /usr/sbin/pkg_add
+PKG_CREATE?= /usr/sbin/pkg_create
+PKG_DELETE?= /usr/sbin/pkg_delete
+PKG_INFO?= /usr/sbin/pkg_info
RM?= /bin/rm
RMDIR?= /bin/rmdir
SED?= /usr/bin/sed
@@ -461,6 +497,7 @@ SH?= /bin/sh
SU?= /usr/bin/su
TAIL?= /usr/bin/tail
TEST?= /bin/test
+TOUCH?= /usr/bin/touch
TR?= /usr/bin/tr
TRUE?= /usr/bin/true
TYPE?= type
@@ -1107,7 +1144,7 @@ root-install:
if [ ! -d ${PREFIX} ]; then \
mkdir -p ${PREFIX}; \
fi; \
- ${MTREE_CMD} ${MTREE_ARGS} ${PREFIX}/; \
+ ${MTREE} ${MTREE_ARGS} ${PREFIX}/; \
fi; \
else \
${ECHO_MSG} "Warning: not superuser, can't run mtree."; \
@@ -1132,7 +1169,7 @@ root-install:
.endfor
${_PKG_SILENT}(${_PKG_DEBUG}newmanpages=`${EGREP} -h \
'^([^/]*/)*man/([^/]*/)?(man[1-9ln]/.*\.[1-9ln]|cat[1-9ln]/.*\.0)(\.gz)?$$' \
- ${PLIST_SRC} || /usr/bin/true`; \
+ ${PLIST_SRC} || ${TRUE}`; \
if [ X"${MANCOMPRESSED}" != X"" -a X"${MANZ}" = X"" ]; then \
${ECHO_MSG} "===> [Automatic manual page handling]"; \
${ECHO_MSG} "===> Decompressing manual pages for ${PKGNAME}"; \
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index 7df5dc8290b..65d8b3529bb 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.8 1999/05/26 14:47:07 tv Exp $
+# $NetBSD: bsd.prefs.mk,v 1.9 1999/06/23 17:06:21 christos Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -13,11 +13,20 @@
BSD_PKG_MK=1
__PREFIX_SET__:=${PREFIX}
+.if exists(/usr/bin/uname)
+UNAME=/usr/bin/uname
+.elif exists(/bin/uname)
+UNAME=/bin/uname
+.else
+UNAME=echo Unknown
+.endif
+
.ifndef OPSYS
-OPSYS!= /usr/bin/uname -s
+OPSYS!= ${UNAME} -s
.endif
.ifndef OS_VERSION
-OS_VERSION!= /usr/bin/uname -r
+OS_VERSION!= ${UNAME} -r
+OS_MAJOR_VERSION!= echo ${OS_VERSION} | sed -e 's/\..*//g'
.endif
# Preload these for architectures not in all variations of bsd.own.mk.
@@ -31,14 +40,15 @@ GNU_ARCH.sparc?= sparc
GNU_ARCH.vax?= vax
MACHINE_GNU_ARCH?= ${GNU_ARCH.${MACHINE_ARCH}}
-.if (${OPSYS} == "NetBSD")
-LOWER_OPSYS?= netbsd
-.elif (${OPSYS} == "SunOS")
-LOWER_OPSYS?= solaris
+.if (${OPSYS} == "SunOS")
LOWER_VENDOR?= sun
-.elif !defined(LOWER_OPSYS)
+.endif
+.if !defined(LOWER_OPSYS)
LOWER_OPSYS!= echo ${OPSYS} | tr A-Z a-z
.endif
+.if !defined(CAPITAL_OPSYS)
+CAPITAL_OPSYS!= echo ${OPSYS} | tr a-z A-Z
+.endif
LOWER_VENDOR?=
LOWER_ARCH?= ${MACHINE_GNU_ARCH}
@@ -52,7 +62,7 @@ NEED_OWN_INSTALL_TARGET=no
.include <bsd.own.mk>
-.if (${OPSYS} == "NetBSD") || (${OPSYS} == "SunOS")
+.if (${OPSYS} == "NetBSD") || (${OPSYS} == "SunOS") || (${OPSYS} == "Linux")
SHAREOWN?= ${DOCOWN}
SHAREGRP?= ${DOCGRP}
SHAREMODE?= ${DOCMODE}