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/:\$\$//')
84 j2se_install_scripts() {
85 cat > "$debian_dir/postinst" << EOF
90 if [ "\$1" = configure ]; then
92 # Common functions for all install scripts
94 # install_alternatives program_base programs
95 install_alternatives() {
98 for program in \$*; do
99 if [[ -f "\$program_base/\$program" ]]; then
100 update-alternatives \\
101 --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority \\
102 --slave "/usr/share/man/man1/\$program.1.gz" "\$program.1.gz" "$jvm_base$j2se_name/man/man1/\$program.1.gz"
107 # install_alternatives_no_man program_base programs
108 install_no_man_alternatives() {
111 for program in \$*; do
112 if [[ -f "\$program_base/\$program" ]]; then
113 update-alternatives --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority
118 # install_browser_plugin link_path link_name plugin_name plugin
119 install_browser_plugin() {
120 local link_path="\$1"
121 local link_name="\$2"
122 local plugin_name="\$3"
124 [ -d "\$link_path" ] || install -d -m 755 "\$link_path"
125 if [[ -f "\$plugin" ]]; then
126 update-alternatives --install "\$link_path/\$link_name" "\$plugin_name" "\$plugin" $j2se_priority
131 eval "$j2se_install" >> "$debian_dir/postinst"
133 cat >> "$debian_dir/postinst" << EOF
140 chmod 755 "$debian_dir/postinst"
142 cat > "$debian_dir/prerm" << EOF
148 remove | deconfigure)
150 # Common functions for all remove scripts
152 # remove_alternatives program_base programs
153 remove_alternatives() {
156 for program in \$*; do
157 update-alternatives --remove "\$program" "\$program_base/\$program"
161 # remove_browser_plugin plugin_name plugin
162 remove_browser_plugin() {
163 local plugin_name="\$1"
165 update-alternatives --remove "\$plugin_name" "\$plugin"
169 eval "$j2se_remove" >> "$debian_dir/prerm"
171 cat >> "$debian_dir/prerm" << EOF
179 chmod 755 "$debian_dir/prerm"
185 j2se_version="$j2se_version"
186 maintainer_name="$maintainer_name"
187 maintainer_email="$maintainer_email"
188 date="$( date +%Y/%m/%d )"
192 # jinfos prefix program_base programs
197 for program in $*; do
198 echo "$prefix $program $program_base$program"
203 if [ -n "$build_source" ]; then
204 local source_dir=${j2se_package}-${j2se_version}
205 echo " copy ${source_dir} into directory $working_dir/"
206 rm -rf "$working_dir/${source_dir}"
207 cp -r "$package_dir" "$working_dir/${source_dir}"
210 The Debian source package has been created in the current directory.
211 You can build the package with:
214 dpkg-buildpackage -b -uc -us
219 echo "Create debian package:"
221 dpkg-buildpackage -b -uc -us
223 local deb_filename="$( echo "${j2se_package}_"*.deb )"
224 echo " copy $deb_filename into directory $working_dir/"
225 cp "$deb_filename" "$working_dir/"
226 if [ -n "$genchanges" ]; then
227 echo " dpkg-genchanges"
228 local changes_filename="${deb_filename%.deb}.changes"
229 echo " copy $changes_filename into directory $working_dir/"
230 cp "$changes_filename" "$working_dir/"
234 The Debian package has been created in the current directory.
235 You can install the package as root with:
237 dpkg -i $deb_filename