3 Package for $j2se_title
6 This package has been automatically created with java-package ($version).
7 All files from the original distribution should have been installed in
8 the directory $jvm_base$j2se_name. Please take a look at this directory for
15 $j2se_package ($j2se_version) unstable; urgency=medium
17 * This package was created with java-package ($version).
19 -- $maintainer_name <$maintainer_email> $( date -R )
24 if test -n "$build_depends"; then
25 build_depends=", $build_depends"
29 Section: non-free/devel
31 Maintainer: $maintainer_name <$maintainer_email>
32 Build-Depends: debhelper (>= 9)${build_depends}
33 Standards-Version: 3.9.5
40 ----------------------------------------------------------------------
42 This file contains a copy of all copyright files found in the original
43 distribution. The original copyright files and further information can
44 be found in the directory $jvm_base$j2se_name and its
47 ----------------------------------------------------------------------
51 find * -type f -iname copyright ! -path debian/copyright |
57 ----------------------------------------------------------------------
60 iconv -f ISO-8859-15 -t UTF-8 "$file" | sed 's/[ \t]*$//'
63 ----------------------------------------------------------------------
77 dh_compress \$(shell find $j2se_name/man/ -type f ! -name '*.gz' -printf '${jvm_base##/}/%p\n')
79 override_dh_shlibdeps:
80 dh_shlibdeps --exclude=fxavcodecplugin --exclude=avplugin -l\$(shell find $j2se_name -type f -name '*.so*' -printf '${jvm_base##/}/%h\n' | sort -u | tr '\n' ':' | sed 's/:\$\$//')
95 j2se_install_scripts() {
96 cat > "$debian_dir/postinst" << EOF
101 if [ "\$1" = configure ]; then
103 # Common functions for all install scripts
105 # install_alternatives program_base programs
106 install_alternatives() {
109 for program in \$*; do
110 if [[ -f "\$program_base/\$program" ]]; then
111 update-alternatives \\
112 --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority \\
113 --slave "/usr/share/man/man1/\$program.1.gz" "\$program.1.gz" "$jvm_base$j2se_name/man/man1/\$program.1.gz"
118 # install_alternatives_no_man program_base programs
119 install_no_man_alternatives() {
122 for program in \$*; do
123 if [[ -f "\$program_base/\$program" ]]; then
124 update-alternatives --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority
129 # install_browser_plugin link_path link_name plugin_name plugin
130 install_browser_plugin() {
131 local link_path="\$1"
132 local link_name="\$2"
133 local plugin_name="\$3"
135 [ -d "\$link_path" ] || install -d -m 755 "\$link_path"
136 if [[ -f "\$plugin" ]]; then
137 update-alternatives --install "\$link_path/\$link_name" "\$plugin_name" "\$plugin" $j2se_priority
141 if [ "$create_cert_softlinks" == "true" ];then
142 cat >> "$debian_dir/postinst" << EOF
143 for subdir in lib/security jre/lib/security;do
144 if [ -f $jvm_base$j2se_name/\$subdir/cacerts ]; then
145 ln -sf /etc/ssl/certs/java/cacerts $jvm_base$j2se_name/\$subdir/cacerts
150 eval "$j2se_install" >> "$debian_dir/postinst"
152 cat >> "$debian_dir/postinst" << EOF
159 chmod 755 "$debian_dir/postinst"
161 cat > "$debian_dir/prerm" << EOF
167 remove | deconfigure)
169 # Common functions for all remove scripts
171 # remove_alternatives program_base programs
172 remove_alternatives() {
175 for program in \$*; do
176 update-alternatives --remove "\$program" "\$program_base/\$program"
180 # remove_browser_plugin plugin_name plugin
181 remove_browser_plugin() {
182 local plugin_name="\$1"
184 update-alternatives --remove "\$plugin_name" "\$plugin"
188 eval "$j2se_remove" >> "$debian_dir/prerm"
190 cat >> "$debian_dir/prerm" << EOF
198 chmod 755 "$debian_dir/prerm"
204 j2se_version="$j2se_version"
205 maintainer_name="$maintainer_name"
206 maintainer_email="$maintainer_email"
207 date="$( date +%Y/%m/%d )"
211 # jinfos prefix program_base programs
216 for program in $*; do
217 echo "$prefix $program $program_base$program"
222 if [ -n "$build_source" ]; then
223 local source_dir=${j2se_package}-${j2se_version}
224 echo " copy ${source_dir} into directory $working_dir/"
225 rm -rf "$working_dir/${source_dir}"
226 cp -r "$package_dir" "$working_dir/${source_dir}"
229 The Debian source package has been created in the current directory.
230 You can build the package with:
233 dpkg-buildpackage -b -uc -us
238 echo "Create debian package:"
240 dpkg-buildpackage -b -uc -us
242 local deb_filename="$( echo "${j2se_package}_"*.deb )"
243 echo " copy $deb_filename into directory $working_dir/"
244 cp "$deb_filename" "$working_dir/"
245 if [ -n "$genchanges" ]; then
246 echo " dpkg-genchanges"
247 local changes_filename="${deb_filename%.deb}.changes"
248 echo " copy $changes_filename into directory $working_dir/"
249 cp "$changes_filename" "$working_dir/"
253 The Debian package has been created in the current directory.
254 You can install the package as root with:
256 dpkg -i $deb_filename