summaryrefslogtreecommitdiff
path: root/debian/README.source
blob: 87678eb78e09b27c7a31afbdb3aa001e29b2d327 (plain)
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
70
71
72
73
74
75
76
Content of source package
=========================
"openjdk-8" is a composite source package:
- Multiple tarballs from each Oracle mercurial repositories :
  corba / hotspot / jaxp / jaxws / jdk-dfsg / langtools / openjdk
- Tarball from JamVM <http://jamvm.sourceforge.net>.
- Debian packaging scripts and patches.

Building a new OpenJDK-8 Debian package
===================================================
Pre-requisites:
- Mercurial
- Bazaar
 sudo aptitude install mercurial bzr

0) Clone OpenJDK debian packaging:
 bzr branch lp:~openjdk/openjdk/openjdk7 openjdk7/
   or update existing repository clone:
 (cd openjdk7/; bzr pull --remember lp:~openjdk/openjdk/openjdk7)

1) Clone IcedTea-7 HG:
 hg clone http://icedtea.classpath.org/hg/icedtea7 icedtea-2.1.1/
   or update existing repository clone:
 (cd icedtea7/; hg pull -u)

2) Download OpenJDK upstream tarballs and move them to $BUILD/
 export BUILD=7u3
 mkdir -p $BUILD/
 (
   cd icedtea-2.1.1/
   sh autogen.sh && ./configure --enable-jamvm
   make download
 )
 
 mv icedtea-2.1.1/*.tar.gz $BUILD/
 (
   cd icedtea-2.1.1/
   make distclean
 )

3) Remove files with unclear license from jdk.tar.gz:
 sh openjdk7/generate-dfsg-zip.sh $BUILD/jdk.tar.gz
 sh openjdk7/generate-dfsg-zip.sh $BUILD/langtools.tar.gz

4) Check tarballs' name and version (for original directory name)
   in openjdk7/generate-debian-orig.sh and package version in
   openjdk7/changelog

5) Generate "orig" directory and "orig+debian" directory
 sh openjdk7/generate-debian-orig.sh

Support for DEB_BUILD_OPTIONS
=============================
As described in Debian Policy §4.9.1, current package's debian/rules support
the standardized environment variable DEB_BUILD_OPTIONS. This variable can
contain several flags to change how a package is compiled and built.

  * nocheck: don't run jtreg test suites.
  * nodocs: pass --disable-docs to IcedTea configure script, which
            disable Javadoc generation.
  * nostrip: debugging symbols should not be stripped from the
             binary during installation
  * parallel=X: package should be built using up to X parallel processes
  * nobootstrap: don't use gcj to bootstrap OpenJDK but use existing OpenJDK
                 installed on current machine.
  * noaltzero: don't build alternative Zero VM.
  * noaltshark: don't build alternative Shark VM.
  * noaltjamvm: don't build alternative Jamvm VM.

Sample usage:
DEB_BUILD_OPTIONS="parallel=5 nocheck" debuild -i"(\.hg|\.bzr)"

 Build with 5 parallel processes and don't run jtreg test suites.

This also work with cowbuilder/pbuilder:
DEB_BUILD_OPTIONS="parallel=5 nocheck" pdebuild -i"(\.hg|\.bzr)" --logfile ../build.log --pbuilder cowbuilder