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 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896
|
#!/usr/bin/make -f
# -*- makefile -*-
# debian/rules file derived from the gcc build system
unexport LANG LC_ALL
export DH_OPTIONS=
export SHELL=/bin/bash
DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
arch_map := amd64=amd64 i386=i586 powerpc=ppc sparc=sparc ia64=ia64
archdir_map := amd64=amd64 i386=i386 powerpc=ppc sparc=sparc ia64=ia64
arch := $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \
$(filter $(DEB_HOST_ARCH)=%, $(arch_map))))
archdir := $(strip $(patsubst $(DEB_HOST_ARCH)=%, %, \
$(filter $(DEB_HOST_ARCH)=%, $(archdir_map))))
TOP := usr/lib/jvm
dirparts := $(shell basename $(CURDIR) | tr '-' ' ')
VENDOR := $(word 1, $(dirparts))
Vendor := $(shell perl -e 'print ucfirst("$(VENDOR)");')
javaname := $(shell echo $(word 2, $(dirparts)) | sed 's/[0-9.]*$$//')
RELEASE := $(shell echo $(word 2, $(dirparts)) | sed 's/^[a-z]*//')
# where to get it?
relstring := 5.0
PRODUCT := $(javaname)$(RELEASE)
srcname = $(VENDOR)-$(PRODUCT)
basename = $(ia32_prefix)$(VENDOR)-$(PRODUCT)
version := $(word 3, $(dirparts))
releng_ver := $(word 4, $(dirparts))
unpackdir := jdk$(version)_$(releng_ver)
jdirname := $(ia32_prefix)java-$(version)-$(VENDOR)-$(version).$(releng_ver)
jdiralias := $(ia32_prefix)java-$(version)-$(VENDOR)
srcdir := $(arch)-jdk
bin_pattern = jdk-$(subst .,_,$(version))_$(releng_ver)-dlj-linux-%.bin
all_archs = $(filter $(subst =, , $(arch_map)), \
$(subst -, , $(patsubst %.bin, %, $(wildcard *.bin))))
priority := 53
tag := $(strip $(subst .,, $(RELEASE)))
mantag := $(VENDOR)$(tag)
basedir = $(TOP)/$(jdirname)
doc := usr/share/doc
j2se_lib := usr/lib/$(basename)
j2se_share := usr/share/$(jdirname)
security := etc/$(jdiralias)/security
lintian_overrides := usr/share/lintian/overrides
ifneq ($(DEB_HOST_ARCH),ia64)
packaging_files = packaging-files
endif
ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 ia64))
with_ia32 = yes
ia32_packaging_files = ia32-packaging-files
endif
info:
@echo Build information
@echo ==========================
@echo 'TOP = $(TOP)'
@echo 'VENDOR = $(VENDOR)'
@echo 'RELEASE = $(RELEASE)'
@echo 'PRODUCT = $(PRODUCT)'
@echo 'basename = $(basename)'
@echo 'version = $(version)'
@echo 'releng_ver = $(releng_ver)'
@echo 'unpackdir = $(unpackdir)'
@echo 'srcdir = $(srcdir)'
d = debian/tmp
p_jre := $(basename)-jre
p_jbin := $(basename)-bin
p_jdk := $(basename)-jdk
p_src := $(basename)-source
p_fonts := $(basename)-fonts
p_demo := $(basename)-demo
p_doc := $(basename)-doc
p_plug := $(basename)-plugin
d_jre := debian/$(p_jre)
d_jbin := debian/$(p_jbin)
d_jdk := debian/$(p_jdk)
d_src := debian/$(p_src)
d_demo := debian/$(p_demo)
d_fonts := debian/$(p_fonts)
d_doc := debian/$(p_doc)
d_plug := debian/$(p_plug)
ifneq ($(DEB_HOST_ARCH),ia64)
binary_arch_targets = \
$(patsubst %, binary-%, $(p_jbin) $(p_jdk) $(p_demo))
endif
ifeq ($(DEB_HOST_ARCH),i386)
binary_arch_targets += binary-$(p_plug)
endif
ifeq ($(with_ia32),yes)
binary_arch_targets += ia32-binary-bin
#binary_arch_targets += ia32-binary-plugin
endif
binary_indep_targets := \
$(patsubst %, binary-%, $(p_jre) $(p_src) $(p_fonts) $(p_doc))
NO_PACKAGES = -Nia32-$(p_plug)
ifneq ($(with_ia32),yes)
NO_PACKAGES += -Nia32-$(p_jbin)
endif
# (most) jre and jdk tools handled by the alternatives system.
# dups in heimdal-clients, krb5-user: kinit, klist, ktab, no alternatives
all_jre_tools = $(notdir $(wildcard $(srcdir)/jre/bin/*))
corba_tools = orbd servertool tnameserv
jre_tools = $(filter-out $(corba_tools), $(all_jre_tools))
jre_tools_alt = $(filter-out kinit klist ktab, $(jre_tools)) $(corba_tools)
all_jdk_tools = $(notdir $(wildcard $(srcdir)/bin/*))
jdk_tools = $(filter-out $(all_jre_tools), $(all_jdk_tools))
jdk_tools_alt = $(jdk_tools)
jre_manpages_re:= $(shell echo $(jre_tools) $(corba_tools) | tr -s ' ' '|')
#ship_packs = yes
ifeq ($(ship_packs),yes)
jre_packs = $(shell cd $(srcdir); find jre/lib -name '*.pack')
jdk_packs = $(shell cd $(srcdir); find lib -name '*.pack')
endif
# TODO: unpack both tarballs, compare them to ensure we do things right
# these are identical files / directories
common_jre_things = \
jre/lib/audio \
jre/lib/cmm \
jre/lib/fonts \
jre/lib/images/cursors \
jre/lib/oblique-fonts \
jre/lib/zi \
jre/lib/jsse.jar \
jre/COPYRIGHT \
jre/LICENSE \
jre/THIRDPARTYLICENSEREADME.txt \
common_jdk_things = \
# jar files, whith the same contents; just the time stamps differ
common_jre_jars = \
jre/lib/ext/sunjce_provider.jar \
jre/lib/ext/dnsns.jar \
jre/lib/ext/localedata.jar \
jre/lib/jce.jar \
jre/lib/security/US_export_policy.jar \
jre/lib/security/local_policy.jar \
jre/lib/im/indicim.jar \
jre/lib/im/thaiim.jar \
jre/lib/charsets.jar \
version_tag := $(shell dpkg-parsechangelog | \
sed -ne 's/Version: *\([0-9]\+:\)*//p')
tag:
cvs tag -c -F $(subst .,_,$(ctp_tag)_debian_version_$(version_tag))
ifeq ($(findstring -,$(version_tag)),)
cvs tag -c -F $(subst .,_,$(ctp_tag)_upstream_version_$(version_tag))
endif
showtags:
@echo Version: $(version)
@echo Release: $(release)
@echo CTP tag: $(ctp_tag)
control: control-stamp
control-stamp: debian/control $(ia32_packaging_files) $(packaging_files)
touch control-stamp
build: build-stamp
build-stamp: info unpack-stamp control-stamp
touch build-stamp
debian/control: debian/control.in
@cp -p debian/control debian/control.old
sed -e 's/@JRE@/$(p_jre)/g' \
-e 's/@JDK@/$(p_jdk)/g' \
-e 's/@vendor@/$(Vendor)/g' \
-e 's/@basename@/$(basename)/g' \
-e 's,@basedir@,$(basedir),g' \
-e 's/@srcname@/$(srcname)/g' \
-e 's/@arch@/$(DEB_HOST_ARCH)/g' \
-e 's/@sarch@/$(arch)/g' \
-e 's/@RELEASE@/$(relstring)/g' \
-e 's/@archdir@/$(archdir)/g' \
debian/control.in > debian/control
@if cmp -s debian/control debian/control.old; then \
rm -f debian/control.old; \
else \
echo "debian/control did change, please restart the build"; \
exit 1; \
fi
ifeq (,$(ia32_prefix))
in_files = debian/*.in
else
in_files = debian/JB-{archive,bin,control,java,policy,plugin,web}*.in
ia32txt= $(empty_) (32bit)
endif
packaging-files:
for f in $(in_files); do \
case "$$f" in debian/control.in) continue; esac; \
f2=$$(echo $$f | sed 's/JB/$(basename)/;s/\.in$$//'); \
sed -e 's/@JRE@/$(p_jre)/g' \
-e 's/@JDK@/$(p_jdk)/g' \
-e 's/@vendor@/$(Vendor)/g' \
-e 's/@RELEASE@/$(relstring)/g' \
-e 's/@basename@/$(basename)/g' \
-e 's,@TOP@,$(TOP),g' \
-e 's,@basedir@,$(basedir),g' \
-e 's,@basediralias@,$(TOP)/$(jdiralias),g' \
-e 's,@jdiralias@,$(jdiralias),g' \
-e 's,@jdirname@,$(jdirname),g' \
-e 's/@srcname@/$(srcname)/g' \
-e 's/@arch@/$(DEB_HOST_ARCH)/g' \
-e 's/@sarch@/$(arch)/g' \
-e 's/@archdir@/$(archdir)/g' \
-e 's/@tag@/$(tag)/g' \
-e 's/@ia32txt@/$(ia32txt)/g' \
-e 's/@priority@/$(priority)/g' \
-e 's/@mantag@/$(mantag)/g' \
-e 's/@jre_tools@/$(jre_tools_alt)/g' \
-e 's/@jdk_tools@/$(jdk_tools_alt)/g' \
-e 's/@corba_tools@/$(corba_tools)/g' \
-e 's,@jre_packs@,$(jre_packs),g' \
-e 's,@jdk_packs@,$(jdk_packs),g' \
-e 's,@j2se_lib@,$(j2se_lib),g' \
-e 's,@j2se_share@,$(j2se_share),g' \
$$f > $$f2; \
done
ifeq ($(DEB_HOST_ARCH),i386)
cat debian/$(p_jbin)-i586.menu >> $(d_jbin).menu
rm -f debian/$(p_jbin)-i586.menu
endif
ia32-packaging-files:
$(MAKE) -f debian/rules packaging-files \
ia32_prefix=ia32- \
packaging_files= \
DEB_HOST_ARCH=i386
compare-jre-jars:
set -e; set -- $(all_archs); src1=$$1-jdk/src; shift; \
jars=$$(cd i586-jdk/; find jre -name '*.jar'); \
for j in $$jars; do \
echo ======= $$j ========; \
if [ ! -f amd64-jdk/$$j ]; then \
echo "file does not exist: amd64-jdk/$$j"; \
continue; \
fi; \
d=$${j%*.jar}; \
rm -rf i586-jdk/$$d amd64-jdk/$$d; \
unzip -q -d i586-jdk/$$d i586-jdk/$$j; \
unzip -q -d amd64-jdk/$$d amd64-jdk/$$j; \
if diff -ur i586-jdk/$$d amd64-jdk/$$d; then \
: ; \
else \
badjars="$$badjars $$j"; \
fi; \
done; \
if [ -n "$$badjars" ]; then \
echo "Differing jar files: $$badjars"; \
exit 1; \
fi
diff_ignore = -I 'Tuesday, June 27' -I 'Thursday, November 9' -I 'Wednesday, June 28' \
-I 'Thu Nov 09' -I 'Tue Jul 11' -I '^ *// java GenerateCharacter'
with_check = yes
unpack-stamp: $(foreach a, $(all_archs), unpack-$(a)-stamp)
ifeq ($(with_check),yes)
: # check for identical files / trees
set -e; set -- $(all_archs); a1=$$1; shift; \
for a2; do \
echo "Comparing architecture $$a1 with $$a2"; \
for i in $(common_jre_things); do \
echo " Comparing $$i ..."; \
if diff -ur $$a1-jdk/$$i $$a2-jdk/$$i; then \
echo " OK"; \
else \
echo " differ"; \
badjars="$$badthings $$i"; \
fi; \
done; \
done; \
if [ -n "$$badthings" ]; then \
echo "Differing files/subtrees: $$badthings"; \
exit 1; \
fi
: # check for jars with the same content
set -e; \
for j in $(common_jre_jars); do \
echo " Comparing $$j ..."; \
d=$${j%*.jar}; \
set -- $(all_archs); a1=$$1; shift; \
mkdir -p tmp-$$a1/$$d; \
unzip -q -d tmp-$$a1/$$d $$a1-jdk/$$j; \
for a2; do \
mkdir -p tmp-$$a2/$$d; \
unzip -q -d tmp-$$a2/$$d $$a2-jdk/$$j; \
if diff -ur tmp-$$a1/$$d tmp-$$a2/$$d; then \
echo " OK"; \
else \
echo " differ"; \
badjars="$$badjars $$j ($$a1, $$a2)"; \
fi; \
done; \
done; \
if [ -n "$$badjars" ]; then \
echo "Differing jar files: $$badjars"; \
exit 1; \
fi
: # check if the sources are the "same"
set -e; set -- $(all_archs); a1=$$1; shift; \
unzip -q -d tmp-$$a1/src $$a1-jdk/src.zip; \
for a2; do \
unzip -q -d tmp-$$a2/src $$a2-jdk/src.zip; \
echo "Comparing sources: tmp-$$a1/src tmp-$$a2/src ..."; \
echo " diff -ur $(diff_ignore)"; \
diff -ur $(diff_ignore) tmp-$$a1/src tmp-$$a2/src; \
done
@echo No relevant differences
endif
touch unpack-stamp
unpack-amd64-stamp: unpack-i586-stamp
unpack-%-stamp: $(bin_pattern)
rm -rf $(unpackdir)
# $(SHELL) tmp-$< --accept-license > /dev/null
binsize=$$(wc -c $< | awk '{print $$1}'); \
zipstart=$$(unzip -ql $< 2>&1 >/dev/null \
| sed -n -e 's/.* \([0-9][0-9]*\) extra bytes.*/\1/p'); \
tail -c $$(expr $$binsize - $$zipstart) $< > tmp-jdk.zip
unzip -q tmp-jdk.zip
mv $(unpackdir) $*-jdk
@echo $*
case "$*" in i586) \
patch -p0 < debian/patches/control-panel.diff; \
esac
diff -u $*-jdk/LICENSE $*-jdk/jre/LICENSE
diff -u $*-jdk/THIRDPARTYLICENSEREADME.txt \
$*-jdk/jre/THIRDPARTYLICENSEREADME.txt
ifneq ($(ship_packs),yes)
set -e; \
for i in $$(find $*-jdk -name '*.pack'); do \
i586-jdk/bin/unpack200 $$i \
$$(dirname $$i)/$$(basename $$i .pack).jar; \
rm -f $$i; \
done
endif
: fix permissions
-find $*-jdk -name '*.properties' | xargs chmod 644
# for i in `find $*-jdk/man/man1` -name '*.1'; do \
# mv $$i `dirname $$i`/`basename $$i .1`.$(mantag).1; \
# done
find $*-jdk/. -name "CVS" -print0 | xargs -0 rm -rf
# for i in `find $*-jdk/man/ja_JP.eucJP -name *.1.gz`; do \
# mv $$i `dirname $$i`/`basename $$i 1.gz`ja.1.gz; \
# done
touch $@
update-dlj: build-stamp
touch debian/dlj.templates
update-copyright: build-stamp
jdkdir=$(srcdir) jdkdistrosdir=debian pkgdir=debian \
sh debian/mkcopy.sh
clean:
dh_testdir
dh_testroot
rm -f *-stamp
rm -rf amd64-jdk i586-jdk tmp-* $(unpackdir)
rm -f debian/*.debhelper debian/more debian/control.old
rm -f debian/$(p_jbin).substvars.tmp
: # TODO: and these should be
: # -rm -f $(d_jre).copyright debian/copyright
for f in debian/*.in; do \
f2=$$(echo $$f | sed 's/JB/$(basename)/;s/\.in$$//'); \
case "$$f2" in debian/control) continue; esac; \
rm -f $$f2; \
done
rm -f debian/$(basename)*.templates
rm -f debian/$(basename)*.links
rm -f debian/copyright.1*
rm -f debian/ia32-$(basename)*.*
dh_clean
mrproper: clean
rm -rf build-stamp $(srcdir)
binary-$(p_jbin): DH_OPTIONS=-p$(p_jbin) $(NO_PACKAGES)
binary-$(p_jbin): build
dh_testdir
dh_testroot
dh_clean -d
dh_installdirs \
usr/share/doc \
etc/$(jdiralias)/security \
$(basedir)/ext \
$(basedir)/man/man1 \
$(basedir)/man/ja/man1 \
$(basedir)/jre/man/man1 \
$(basedir)/jre/man/ja/man1 \
$(basedir)/bin/$(archdir)/native_threads \
usr/share/$(jdirname) \
usr/share/lintian/overrides \
usr/share/applications \
usr/share/application-registry \
usr/share/icons \
usr/share/mime-info \
usr/share/control-center-2.0/capplets
cp -a $(srcdir)/jre $(d_jbin)/$(basedir)
echo $(basedir) $(TOP)/$(jdiralias) > $(d_jbin).links
: remove arch indep files and directories
rm -rf $(foreach i, $(common_jre_things) $(common_jre_jars), $(d_jbin)/$(basedir)/$(i))
: # icons, only in the i586 archive -> $(p_jre)
rm -rf $(d_jbin)/$(basedir)/jre/lib/images/icons
# : # 1.4 only
# rm -f $(d_jbin)/$(basedir)/jre/lib/$(archdir)/libagent.so
# -find $(d_jbin) -name HtmlConverter -o -name htmlconverter.jar | xargs rm -f
### : # get upstream docs out of there
### -rm $(d_jbin)/$(j2se_lib)/jre/{CHANGES,COPYRIGHT,INSTALL,*LICENSE*,README
rm -f $(d_jbin)/$(basedir)/jre/{CHANGES,INSTALL}
: # move config files to etc/$(jdiralias) and symlink them.
mv $(d_jbin)/$(basedir)/jre/lib/*.properties \
$(d_jbin)/etc/$(jdiralias)/
cp debian/fontconfig.properties.src \
$(d_jbin)/etc/$(jdiralias)/fontconfig.properties
# we are required to keep them for license reasons
# rm -f $(d_jbin)/etc/$(jdiralias)/*{Red,Sun,SuSE,Turbo}*
mv $(d_jbin)/$(basedir)/jre/lib/$(archdir)/jvm.cfg \
$(d_jbin)/etc/$(jdiralias)/
: # TODO: why do we provide a custom font.properties.ja?
: # cp -p debian/font.properties.ja $(d_jbin)/etc/$(jdiralias)/.
-mv $(d_jbin)/$(basedir)/jre/lib/security/{java.*,cacerts} \
$(d_jbin)/$(security)
: # create links for the conffiles
find $(d_jbin)/etc/$(jdiralias) -type f ! -name jvm.cfg \
-printf "etc/$(jdiralias)/%P $(basedir)/jre/lib/%P\n" >> $(d_jbin).links
echo "etc/$(jdiralias)/jvm.cfg $(basedir)/jre/lib/$(archdir)/jvm.cfg" \
>> $(d_jbin).links
# : # replace duplicate files in bin and jre/bin with links
# for f in `cd $(srcdir)/. && diff -s -r jre/bin bin \
# | sed -n 's/^Files \(.*\) and \(.*\) are identical$$/\2/p'`; \
# do \
# [ $$f = bin/HtmlConverter ] || \
# echo /$(basedir)/jre/$$f /$(basedir)/$$f; \
# done >> $(d_jbin).links
set -e; \
for i in $$(find $(srcdir)/bin -type f); do \
n=$$(basename $$i); \
case " $(jre_tools) $(corba_tools) " in *\ $$n\ *) ;; *) continue; esac; \
echo $(basedir)/jre/bin/$$n $(basedir)/bin/$$n; \
done >> $(d_jbin).links
# if [ -L $(d_jbin)/$(basedir)/jre/$$f ]; then \
# ln -sf `readlink $(d_jbin)/$(basedir)/jre/$$f` \
# $(d_jbin)/$(basedir)/$$f; \
# else \
# ln -sf /$(basedir)/jre/$$f \
# $(d_jbin)/$(basedir)/$$f; \
# fi; \
#
: # give all permissions to cross-VM extension directory
mv $(d_jbin)/$(security)/java.policy \
$(d_jbin)/$(security)/java.policy.orig
sed -e '/permission java\.security\.AllPermission;/,/};/c\' \
-e ' permission java.security.AllPermission;\' \
-e '};\' \
-e '\' \
-e 'grant codeBase "file:/$(basedir)/ext/*" {\' \
-e ' permission java.security.AllPermission;\' \
-e '};\' \
-e '\' \
-e '// Comment this out if you want to give all permissions to the\' \
-e '// Debian Java repository too:\' \
-e '//grant codeBase "file:/usr/share/java/repository/-" {\' \
-e '// permission java.security.AllPermission;\' \
-e '//};\' \
-e '' \
$(d_jbin)/$(security)/java.policy.orig \
> $(d_jbin)/$(security)/java.policy
# 'make Emacs Makefile mode happy
$(RM) $(d_jbin)/$(security)/java.policy.orig
: # add lintian overrides
cp -p debian/$(p_jbin).overrides \
$(d_jbin)/$(lintian_overrides)/$(p_jbin)
: # add GNOME stuff
cp -p debian/$(basename)-java.desktop \
$(d_jbin)/usr/share/applications/
cp -p debian/$(basename)-policytool.desktop \
$(d_jbin)/usr/share/control-center-2.0/capplets/
ifeq ($(DEB_HOST_ARCH),i386)
cp -p debian/$(basename)-{java,javaws}.desktop \
$(d_jbin)/usr/share/applications/
cp -p debian/$(basename)-{controlpanel,policytool}.desktop \
$(d_jbin)/usr/share/control-center-2.0/capplets/
endif
for i in archive web-start; do \
cp debian/$(basename)-$$i.applications \
$(d_jbin)/usr/share/application-registry/; \
cp debian/$(basename)-$$i.keys $(d_jbin)/usr/share/mime-info/; \
cp debian/$(basename)-$$i.mime $(d_jbin)/usr/share/mime-info/; \
done
: # XXX hack, the icon is not available in the amd64 package
cp -p i586-jdk/jre/plugin/desktop/sun_java.png \
$(d_jbin)/usr/share/icons/$(basename).png
cp -p debian/sun_java.xpm \
$(d_jbin)/usr/share/icons/$(basename).xpm
: # install manpages
set -e; \
for m in $$(find $(srcdir)/man/man1 -type f); do \
n=$$(basename $$m .1); \
case " $(jre_tools) $(corba_tools) " in *\ $$n\ *) ;; *) continue; esac; \
cp -p $$m $(d_jbin)/$(basedir)/jre/man/man1/$$n.1; \
ln -s ../../jre/man/man1/$$n.1 $(d_jbin)/$(basedir)/man/man1/$$n.1; \
[ -f $(srcdir)/man/ja/man1/$$n.1 ] || continue; \
cp -p $(srcdir)/man/ja/man1/$$n.1 \
$(d_jbin)/$(basedir)/jre/man/ja/man1/$$n.1; \
ln -s ../../../jre/man/ja/man1/$$n.1 \
$(d_jbin)/$(basedir)/man/ja/man1/$$n.1; \
done
-find $(d_jbin)/$(basedir)/jre/man -name '*.[1-9]' | xargs gzip
# make these absolute links, so we can use them for resolving the dependencies
ifeq (,$(ia32_prefix))
ln -sf /usr/lib/libodbcinst.so.1 \
$(d_jbin)/$(basedir)/jre/lib/$(archdir)/libodbcinst.so
ln -sf /usr/lib/libodbc.so.1 \
$(d_jbin)/$(basedir)/jre/lib/$(archdir)/libodbc.so
# currently unsupported
#else
# ln -sf /usr/lib32/libodbcinst.so.1 \
# $(d_jbin)/$(basedir)/jre/lib/$(archdir)/libodbcinst.so
# ln -sf /usr/lib32/libodbc.so.1 \
# $(d_jbin)/$(basedir)/jre/lib/$(archdir)/libodbc.so
endif
rm -f $(d_jbin).substvars
ld_path=$(d_jbin)/$(basedir)/jre/lib/$(archdir) \
dh_shlibdeps \
-l$$ld_path:$$ld_path/client:$$ld_path/native_threads \
-Xlibjavaplugin_oji.so
sed -i -e 's/libc6[^,]*, *//g' -e 's/libc6[^,]*$$//g' -e 's/ *([^,]*) *//g' \
$(d_jbin).substvars
cp -p $(d_jbin).substvars $(d_plug).substvars
sed -e 's/Depends/Recommends/' \
$(d_jbin).substvars > $(d_jbin).substvars.tmp
rm -f debian/$(p_jbin).substvars
ld_path=$(d_jbin)/$(basedir)/jre/lib/$(archdir) \
dh_shlibdeps -v \
-l$$ld_path:$$ld_path/client:$$ld_path/native_threads:$$ld_path/headless \
-Xjavaws -Xawt_robot -Xpolicytool \
-Xlibjavaplugin -Xlibawt -Xlibjawt -Xlibmawt -Xlibdcpr \
-Xlibfontmanager -XlibXm -Xlibjsoundalsa -X_g.so
sed -i -e 's/ *([^,]*) *//g' $(d_jbin).substvars
cat $(d_jbin).substvars.tmp >> $(d_jbin).substvars
ifeq (,$(ia32_prefix))
echo 'odbc:Depends=unixodbc' >> $(d_jbin).substvars
endif
ln -sf $(subst $(ia32_prefix),, $(p_jre)) $(d_jbin)/usr/share/doc/$(p_jbin)
rm -f debian/$(p_jbin).substvars.tmp
( \
echo 'name=$(jdirname)'; \
echo 'alias=$(jdiralias)'; \
echo 'priority=$(priority)'; \
echo 'section=non-free'; \
echo ''; \
for i in $(jre_tools_alt); do \
echo "jre $$i /$(TOP)/$(jdiralias)/jre/bin/$$i"; \
done; \
for i in $(jdk_tools_alt); do \
echo "jdk $$i /$(TOP)/$(jdiralias)/bin/$$i"; \
done; \
for i in mozilla firefox iceweasel iceape; do \
echo "plugin $$i-javaplugin.so /$(TOP)/$(jdiralias)/jre/plugin/$(archdir)/ns7/libjavaplugin_oji.so"; \
done; \
) > $(d_jbin)/$(TOP)/.$(jdiralias).jinfo
cat debian/dlj.templates >> $(d_jbin).templates
ia32-binary-bin: unpack-stamp
dh_testdir
dh_testroot
$(MAKE) -f debian/rules binary-ia32-$(p_jbin) \
ia32_prefix=ia32- \
packaging_files= \
DEB_HOST_ARCH=i386
for i in $(common_jre_things) $(common_jre_jars); do \
echo $(basedir)/$$i $(TOP)/ia32-$(jdirname)/$$i; \
done >> debian/ia32-$(p_jbin).links
binary-$(p_jre): DH_OPTIONS=-p$(p_jre)
binary-$(p_jre): #binary-$(p_jbin)
dh_testdir
dh_testroot
dh_clean -d
dh_installdirs \
$(basedir)/jre \
usr/share/doc \
$(lintian_overrides)
set -e; \
tar -c -C $(srcdir) -f - $(common_jre_things) $(common_jre_jars) \
| tar -x -C $(d_jre)/$(basedir) -f -
: # these are only in the i586 archive
cp -a i586-jdk/jre/lib/images/icons $(d_jre)/$(basedir)/jre/lib/images/
: # add lintian overrides
cp -p debian/$(p_jre).overrides \
$(d_jre)/$(lintian_overrides)/$(p_jre)
dh_installdocs \
$(srcdir)/jre/README \
debian/README.alternatives \
debian/JAVA_HOME
dh_installchangelogs -k \
$(srcdir)/jre/CHANGES
ln -sf /etc/.java $(d_jre)/$(basedir)/.systemPrefs
cat debian/dlj.templates >> $(d_jre).templates
binary-$(p_plug): DH_OPTIONS=-p$(p_plug)
binary-$(p_plug): #binary-$(p_jbin)
dh_testdir
dh_testroot
dh_clean -d
dh_installdirs \
usr/share/doc \
usr/lib/{firefox,mozilla{,-firefox},iceweasel,iceape}/plugins
ln -s $(p_jbin) $(d_plug)/usr/share/doc/$(p_plug)
# cat debian/dlj.templates >> $(d_plug).templates
ia32-binary-plugin: unpack-stamp
dh_testdir
dh_testroot
$(MAKE) -f debian/rules binary-ia32-$(p_plug) \
ia32_prefix=ia32- \
DEB_HOST_ARCH=i386
binary-$(p_fonts): DH_OPTIONS=-p$(p_fonts)
binary-$(p_fonts): build
dh_testroot
dh_clean -d
dh_installdirs \
usr/share/doc \
usr/share/fonts/truetype/ttf-lucida
cd $(srcdir) && \
for f in jre/lib/*fonts/*.ttf; do \
echo $(basedir)/$$f usr/share/fonts/truetype/ttf-lucida/$$(basename $$f); \
done >> $(CURDIR)/$(d_fonts).links
dh_installdefoma
ln -s $(p_jre) $(d_fonts)/usr/share/doc/$(p_fonts)
# cat debian/dlj.templates >> $(d_fonts).templates
binary-$(p_jdk): DH_OPTIONS=-p$(p_jdk)
binary-$(p_jdk): build
dh_testdir
dh_testroot
dh_clean -d
dh_installdirs \
usr/share/doc/$(p_jdk) \
$(basedir)/jre/lib/$(archdir) \
$(basedir)/man/man1 \
$(basedir)/man/ja/man1 \
$(j2se_share) \
$(lintian_overrides)
-cp -a $(srcdir)/{bin,include,lib,README.html} \
$(d_jdk)/$(basedir)
for i in COPYRIGHT LICENSE THIRDPARTYLICENSEREADME.txt; do \
ln -sf jre/$$i $(d_jdk)/$(basedir)/$$i; \
done
: # remove any runtime files from the jdk package
-find $(d_jbin)/$(basedir)/jre/bin \! -type d \
-printf "$(d_jdk)/$(basedir)/bin/%P\0" | xargs -r0 rm -f
: # fix java-rmi.cgi PATH
perl -pi -e 's:/usr/local/java/bin:/$(basedir)/bin:' \
$(d_jdk)/$(basedir)/bin/java-rmi.cgi
: # add lintian overrides
cp -p debian/$(p_jdk).overrides \
$(d_jdk)/$(lintian_overrides)/$(p_jdk)
ifneq (,$(findstring demo, $(NO_PACKAGES)))
cp -a $(srcdir)/demo $(d_jdk)/$(basedir)/demo
cp -a $(srcdir)/sample $(d_jdk)/$(basedir)/sample
echo $(basedir)/demo usr/share/doc/$(p_jdk)/demo >> $(d_jdk).links
echo $(basedir)/sample usr/share/doc/$(p_jdk)/examples >> $(d_jdk).links
: # add lintian overrides
cat debian/$(p_demo).overrides \
>> $(d_jdk)/usr/share/lintian/overrides/$(p_jdk)
endif
for m in $$(find $(srcdir)/man/man1 -type f); do \
n=$$(basename $$m .1); \
case " $(jre_tools) $(corba_tools) " in *\ $$n\ *) continue; esac; \
cp -p $$m $(d_jdk)/$(basedir)/man/man1/$$n.1; \
[ -f $(srcdir)/man/ja/man1/$$n.1 ] || continue; \
cp -p $(srcdir)/man/ja/man1/$$n.1 \
$(d_jdk)/$(basedir)/man/ja/man1/$$n.1; \
done
-find $(d_jdk)/$(basedir)/man -name '*.[1-9]' | xargs gzip
ld_path=$(d_jbin)/$(basedir)/jre/lib/$(archdir) \
dh_shlibdeps \
-l$$ld_path:$$ld_path/client:$$ld_path/native_threads:$$ld_path/headless \
-Xlibjavaplugin_oji.so -X_g.so
sed -i -e 's/ *([^,]*) *//g' $(d_jdk).substvars
cat debian/dlj.templates >> $(d_jdk).templates
dh_installdocs \
$(srcdir)/README.html debian/README.alternatives
dh_installchangelogs
binary-$(p_demo): DH_OPTIONS=-p$(p_demo)
binary-$(p_demo): build
dh_testdir
dh_testroot
dh_clean -d
dh_installdirs \
usr/share/doc/$(p_jdk) \
usr/share/icons \
$(basedir) \
$(lintian_overrides)
cp -a $(srcdir)/demo $(d_demo)/$(basedir)/demo
cp -a $(srcdir)/sample $(d_demo)/$(basedir)/sample
echo $(basedir)/demo usr/share/doc/$(p_jdk)/demo >> $(d_demo).links
echo $(basedir)/sample usr/share/doc/$(p_jdk)/examples >> $(d_demo).links
cp -p debian/sun_java_app.xpm \
$(d_demo)/usr/share/icons/$(basename)-app.xpm
: # add lintian overrides
cp -p debian/$(p_demo).overrides \
$(d_demo)/$(lintian_overrides)/$(p_demo)
# ( \
# gnome=`find $(d_demo)/usr/share/gnome -type f -printf "%f %P "`; \
# echo "gnome='$$gnome'"; \
# echo "" \
# ) > $(d_demo).debhelper
echo usr/share/doc/$(p_jdk) usr/share/doc/$(p_demo) >> $(d_demo).links
binary-$(p_src): DH_OPTIONS=-p$(p_src)
binary-$(p_src): build
dh_testdir
dh_testroot
dh_clean -d
dh_installdirs \
usr/share/doc \
$(basedir)
cp -a $(srcdir)/src.zip $(d_src)/$(basedir)/
ln -s $(p_jdk) $(d_src)/usr/share/doc/$(p_src)
# cat debian/dlj.templates >> $(d_src).templates
binary-$(p_doc): DH_OPTIONS=-p$(p_doc)
binary-$(p_doc): build
dh_testdir
dh_testroot
dh_clean -d
dh_installdirs \
$(basedir) \
$(lintian_overrides) \
usr/share/doc/$(p_jdk)/html
: # add lintian overrides
cp -p debian/$(p_doc).overrides \
$(d_doc)/$(lintian_overrides)/$(p_doc)
dh_installdocs
dh_installchangelogs
echo "$(doc)/$(p_jdk)/html $(doc)/$(p_doc)/html" > $(d_doc).links
echo "$(doc)/$(p_jdk)/html $(basedir)/docs" >> $(d_doc).links
binary-indep: DH_OPTIONS=-i $(NO_PACKAGES)
binary-indep: $(binary_indep_targets)
dh_testdir
dh_testroot
dh_installdebconf
dh_installmime
dh_desktop
dh_installmenu
-dh_iconcache
dh_link
: # don't compress anything from the shipped demo and sample files
dh_compress -Xdemo -Xsample -X.html
dh_fixperms
: # remove empty directories, when all components are in place
for d in $$(find debian/{$(VENDOR),ia32*} -depth -type d \( ! -name plugins -o -name $(p_jdk) \) -empty 2> /dev/null); do \
while rmdir $$d 2> /dev/null; do d=`dirname $$d`; done; \
done
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary-arch: DH_OPTIONS=-s $(NO_PACKAGES)
binary-arch: $(binary_arch_targets)
dh_testdir
dh_testroot
dh_installdebconf
dh_installmime
dh_desktop
dh_installmenu
-dh_iconcache
: # don't strip the files, we are not allowed to modify these
#dh_strip -X_g.so
dh_link
: # don't compress anything from the shipped demo and sample files
dh_compress -Xdemo -Xsample -X.html
dh_fixperms
: # remove empty directories, when all components are in place
for d in $$(find debian/{$(VENDOR),ia32*} -depth -type d -name plugins -empty 2> /dev/null); do \
while rmdir $$d 2> /dev/null; do d=`dirname $$d`; done; \
done
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-arch binary-indep
.PHONY: binary binary-indep binary-arch install checkroot build
|