-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile_hudson
70 lines (56 loc) · 2.47 KB
/
Makefile_hudson
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
66
67
68
69
# Makefile for creating the DataONE CN build using Hudson.
# Same as Makefile except paths and env vars tweaked to work with Hudson
# build environment and there is no install option
# run make -f Makefile_hudson publish from Hudson to generate the distribution
# Creates distros for Karmic Koala 9.10 and Lucid Lynx 10.04
#
# To install the packages (for a new CN for example):
# Add a line to /etc/apt/sources.list (for lucid):
#
# deb http://dev-testing.dataone.org/ubuntu lucid universe
#
# The sudo apt-get update
#
# Dave Vieglais, 2010-07-01
#
#Get the revision number of the repository - appended to version information
#of the packages so that apt-get upgrade will pick up changed packages.
# The list of packages to build
PKGS = dataone-cn-os-core.deb dataone-cn-metacat.deb dataone-cn-rest-service.deb dataone-cn-portal.deb dataone-cn-processdaemon.deb dataone-cn-version-tool.deb dataone-cn-solr.deb dataone-cn-index.deb dataone-mercury.deb
# The temporary build output directory
BUILDDIR = $(WORKSPACE)/cn-buildout/build
# The location of the the local APT repository used to store our built debs
APTREPOS = $(WORKSPACE)/apt
# Location of the Packages.gz for this architecture
APTPKG = $(APTREPOS)/dists/karmic/universe/binary-amd64
APTPKGL = $(APTREPOS)/dists/lucid/universe/binary-amd64
APTPKGM = $(APTREPOS)/dists/maverick/universe/binary-amd64
#HELLO = $(shell ls /etc)
# Other settings
DPKG_DEB = dpkg-deb
.SUFFIXES: .deb
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " deb to make debian package files from control files"
@echo " clean to remove the build directory"
@echo " publish copy built deb packages to the local apt repository"
clean:
-rm -rf $(BUILDDIR)
-rm -f ${APTREPOS}/*.deb
builddir: clean
mkdir -p $(BUILDDIR)/sources
deb: builddir $(PKGS)
$(PKGS):
cp -r $* $(BUILDDIR)/sources/$*
find $(BUILDDIR)/sources/$* -name .svn | xargs rm -rf
# update version info in packages with the current subversion revision number
sh $(WORKSPACE)/cn-buildout/update-package-revision.sh $*
cd $(BUILDDIR)/sources && $(DPKG_DEB) -b $* ..
publish: deb
mkdir -p $(APTPKG)
mkdir -p $(APTPKGL)
mkdir -p $(APTPKGM)
cp -f $(BUILDDIR)/*.deb $(APTREPOS)
cd $(APTREPOS) && dpkg-scanpackages . /dev/null | gzip -9c > $(APTPKG)/Packages.gz
cd $(APTREPOS) && dpkg-scanpackages . /dev/null | gzip -9c > $(APTPKGL)/Packages.gz
cd $(APTREPOS) && dpkg-scanpackages . /dev/null | gzip -9c > $(APTPKGM)/Packages.gz