/
patch-package__Makefile
65 lines (60 loc) · 1.72 KB
/
patch-package__Makefile
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
$NetBSD$
Provide our own installation target.
--- package/Makefile.orig 2012-08-06 21:57:12.000000000 +0000
+++ package/Makefile
@@ -2,49 +2,8 @@ OS = $(shell uname -s)
KERNEL = $(shell uname -r)
ERLANG_BIN = $(shell dirname $(shell which erl))
-ifeq ($(OS),Linux) # Linux
-ARCH = $(shell uname -m)
-PKGER = $(shell cat /etc/redhat-release 2> /dev/null)
-ifeq ($(PKGER),) # Debian / Ubuntu
-OSNAME = Debian
-PKGERDIR = deb
-BUILDDIR = debuild
-else # Redhat / Centos
-OSNAME = RedHat
-PKGERDIR = rpm
-BUILDDIR = rpmbuild
-endif
-endif # linux
-
-
-ifeq ($(OS),SunOS) # Solaris flavors
-KERNELVER = $(shell uname -v | grep -c joyent 2> /dev/null)
-ARCH = $(shell uname -p)
-
-ifneq ($(KERNELVER),0) # SmartOS
-OSNAME = SmartOS
-PKGERDIR = smartos
-BUILDDIR = smartosbuild
-else # Solaris / OmniOS
-PKGERDIR = solaris
-DISTRO = $(shell head -1 /etc/release|awk \
- '{if ($$1 == "OmniOS") {print $$1} else {print "Solaris"}}')
-OSNAME = ${DISTRO}
-endif
-endif # solaris
-
-ifeq ($(OS),Darwin) # OSX
-OSNAME = OSX
-ARCH = $(shell uname -m)
-PKGERDIR = osx
-BUILDDIR = osxbuild
-endif
-ifeq ($(OS),FreeBSD) # FreeBSD
-OSNAME = $(OS)
-ARCH = $(shell uname -p)
-PKGERDIR = freebsd
-BUILDDIR = bsdbuild
-endif
+PKGER = make
+PKGERDIR = pkgsrc
DATE = $(shell date +%Y-%m-%d)
VERSIONSTRING = $(APP) ($(PKG_VERSION) $(DATE)) $(OSNAME) $(ARCH)
@@ -66,6 +25,6 @@ pkgcheck:
@echo "Packaging \"$(DISTNAME)\""
# The heavy lifting is done by the individual packager Makefiles
-package: pkgcheck build
+package: build
include $(PKGERDIR)/Makefile