Adding LICENSE file
[genesis.git] / fuel-build / f_example_packadd / Makefile
1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 # stefan.k.berg@ericsson.com
4 # jonas.bjurel@ericsson.com
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 TOP := $(shell pwd)
12 PACKAGE := foobar
13 VERSION := 1.0-1
14
15 .PHONY: all
16 all:    release/pool/main/$(PACKAGE)_$(VERSION).deb
17
18 release/pool/main/$(PACKAGE)_$(VERSION).deb:
19         @mkdir -p tmp/src
20         @mkdir -p release/pool/main
21         @cp -r $(PACKAGE)_$(VERSION) tmp/src
22         @gzip -9 tmp/src/$(PACKAGE)_$(VERSION)/usr/share/doc/$(PACKAGE)/changelog.Debian
23         @fakeroot dpkg-deb --build tmp/src/$(PACKAGE)_$(VERSION)
24         @lintian tmp/src/$(PACKAGE)_$(VERSION).deb
25         @cp tmp/src/$(PACKAGE)_$(VERSION).deb release/pool/main
26
27 .PHONY: clean
28 clean:
29         @rm -rf tmp
30         @rm -rf release
31         @rm -f ../release/packages/ubuntu/pool/main/$(PACKAGE)_$(VERSION).deb
32
33
34 .PHONY: release
35 release:release/pool/main/$(PACKAGE)_$(VERSION).deb
36         @cp release/pool/main/$(PACKAGE)_$(VERSION).deb ../release/packages/ubuntu/pool/main
37         @cp -Rvp puppet/modules/* ../release/puppet/modules