File: Makefile

package info (click to toggle)
erlang-bitcask 1.6.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,384 kB
  • ctags: 982
  • sloc: erlang: 4,766; ansic: 2,103; makefile: 219; exp: 86; sh: 14
file content (38 lines) | stat: -rw-r--r-- 1,048 bytes parent folder | download | duplicates (4)
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
OS		= $(shell uname -s)
KERNEL		= $(shell uname -r)
ifeq ($(OS),Linux)
PKGER		= $(shell cat /etc/redhat-release 2> /dev/null)
ifeq ($(PKGER),)
PKGER		= debuild
PKGERDIR	= deb
else
PKGER		= rpmbuild
PKGERDIR	= rpm
endif
endif
ifeq ($(OS),SunOS)
PKGER		= make
PKGERDIR	= solaris
DISTRO		= $(shell awk '{ if (NR==1) print $$1; };' /etc/release)
endif

APP		 = $(shell echo "$(REPO)" | sed -e 's/_/-/g')
# Assumes CURDIR is $(REPO)/package/
RIAK_PATH	?= ..
RELEASE		?= 

$(APP)-$(REVISION).tar.gz: ../$(BITCASK_TAG).tar.gz
	ln -s $< $@

pkgclean: $(PKGERDIR)/pkgclean
	rm -rf $(APP)-$(REVISION).tar.gz working rpmbuild debuild packages

pkgcheck:
	$(if $(BITCASK_TAG),,$(error "You can't generate a release tarball from a non-tagged revision. Run 'git checkout <tag>', then 'make dist'"))
	$(if $(RELEASE),,$(error "You must provide a package release number via RELEASE= on the command line"))
	@echo "Packaging \"$(BITCASK_TAG)\""

# The heavy lifting is done by the individual packager Makefiles
package: pkgcheck build

include $(PKGERDIR)/Makefile