File: GNUmakefile

package info (click to toggle)
pcp 4.3.2%2Breally4.3.1-0.1
  • links: PTS
  • area: main
  • in suites: buster
  • size: 175,188 kB
  • sloc: ansic: 261,305; sh: 123,606; xml: 107,279; cpp: 72,127; perl: 18,283; python: 15,453; yacc: 8,249; lex: 2,585; makefile: 1,957; fortran: 60; java: 52
file content (62 lines) | stat: -rw-r--r-- 1,887 bytes parent folder | download | duplicates (5)
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
#
# Copyright (c) 2013 Red Hat.
# Copyright (c) 2009 Max Matveev.  All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#

TOPDIR = ../..
include $(TOPDIR)/src/include/builddefs

LSRCFILES = pcp.xml preinstall postinstall preremove
LDIRT += pkginfo proto pcp pcp-$(PACKAGE_VERSION)
PACKAGE_ARCH = $(shell uname -p)

default install default_pcp :

install_pcp :
ifeq "$(TARGET_OS)" "solaris"
	$(INSTALL) -m644 pcp.xml /var/svc/manifest/application/pcp.xml
endif

pack_pcp : proto pkginfo
	@rm -rf pcp
	$(PKGMK) -b $${DIST_ROOT} -d . -f proto
	pkgtrans . $(PACKAGE_NAME)-$(PACKAGE_VERSION) $(PACKAGE_NAME)

proto : $(_FORCE)
	@rm -f $@
	@sort -u ../pack_pcp.bin | \
	    awk 'BEGIN { print "i pkginfo=pkginfo"; \
			 print "i preremove=preremove"; \
			 print "i preinstall=preinstall"; \
			 print "i postinstall=postinstall"; \
			} \
	     $$1 == "l" {printf "s none %s=%s\n", substr($$3, 2), $$2; next; } \
	     {printf "%s none %s 0%d %s %s\n", \
		 $$1, substr($$NF, 2) , $$2, $$3, $$4}' > $@

pkginfo : $(_FORCE)
	@rm -f $@
	@echo "PKG=$(PACKAGE_NAME)" > $@
	@echo "NAME=Performance Co-Pilot" >> $@
	@echo "ARCH=$(PACKAGE_ARCH)" >> $@
	@echo "VERSION=$(PACKAGE_VERSION)" >> $@
	@echo "EMAIL=pcp@groups.io" >> $@
	@echo "CATEGORY=application" >> $@
	@echo "BASEDIR=/" >> $@
	@echo "CLASSES=application none" >> $@
ifneq "$(GIT)" ""
	@echo "PSTAMP="`$(GIT) log -n1 --pretty=format:%H` >> $@
endif

include $(BUILDRULES)