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
16 $j2se_package ($j2se_version) unstable; urgency=low
18 * This package was created with java-package ($version).
20 -- $maintainer_name <$maintainer_email> $( date -R )
28 Section: non-free/devel
30 Maintainer: $maintainer_name <$maintainer_email>
31 Build-Depends: debhelper (>= 9)
32 Standards-Version: 3.9.5
39 ----------------------------------------------------------------------
41 This file contains a copy of all copyright files found in the original
42 distribution. The original copyright files and further information can
43 be found in the directory $jvm_base$j2se_name and its
46 ----------------------------------------------------------------------
50 find * -type f -iname copyright ! -path debian/copyright |
56 ----------------------------------------------------------------------
62 ----------------------------------------------------------------------
76 dh_compress \$(shell find $j2se_name/man/ -type f ! -name '*.gz' -printf '${jvm_base##/}/%p\n')
78 override_dh_shlibdeps:
79 dh_shlibdeps --exclude=fxavcodecplugin -l\$(shell find $j2se_name -type f -name '*.so*' -printf '${jvm_base##/}/%h\n' | sort -u | tr '\n' ':' | sed 's/:\$\$//')
83 j2se_install_scripts() {
84 cat > "$debian_dir/postinst" << EOF
89 if [ "\$1" = configure ]; then
91 # Common functions for all install scripts
93 # install_alternatives program_base programs
94 install_alternatives() {
97 for program in \$*; do
98 if [[ -f "\$program_base/\$program" ]]; then
99 update-alternatives \\
100 --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority \\
101 --slave "/usr/share/man/man1/\$program.1.gz" "\$program.1.gz" "$jvm_base$j2se_name/man/man1/\$program.1.gz"
106 # install_alternatives_no_man program_base programs
107 install_no_man_alternatives() {
110 for program in \$*; do
111 if [[ -f "\$program_base/\$program" ]]; then
112 update-alternatives --install "/usr/bin/\$program" "\$program" "\$program_base/\$program" $j2se_priority
117 # install_browser_plugin link_path link_name plugin_name plugin
118 install_browser_plugin() {
119 local link_path="\$1"
120 local link_name="\$2"
121 local plugin_name="\$3"
123 [ -d "\$link_path" ] || install -d -m 755 "\$link_path"
124 if [[ -f "\$plugin" ]]; then
125 update-alternatives --install "\$link_path/\$link_name" "\$plugin_name" "\$plugin" $j2se_priority
130 eval "$j2se_install" >> "$debian_dir/postinst"
132 cat >> "$debian_dir/postinst" << EOF
139 chmod 755 "$debian_dir/postinst"
141 cat > "$debian_dir/prerm" << EOF
147 remove | deconfigure)
149 # Common functions for all remove scripts
151 # remove_alternatives program_base programs
152 remove_alternatives() {
155 for program in \$*; do
156 update-alternatives --remove "\$program" "\$program_base/\$program"
160 # remove_browser_plugin plugin_name plugin
161 remove_browser_plugin() {
162 local plugin_name="\$1"
164 update-alternatives --remove "\$plugin_name" "\$plugin"
168 eval "$j2se_remove" >> "$debian_dir/prerm"
170 cat >> "$debian_dir/prerm" << EOF
178 chmod 755 "$debian_dir/prerm"
184 j2se_version="$j2se_version"
185 maintainer_name="$maintainer_name"
186 maintainer_email="$maintainer_email"
187 date="$( date +%Y/%m/%d )"
191 # jinfos prefix program_base programs
196 for program in $*; do
197 echo "$prefix $program $program_base$program"
203 echo "Create debian package:"
205 dpkg-buildpackage -b -uc -us
207 local deb_filename="$( echo "${j2se_package}_"*.deb )"
208 echo " copy $deb_filename into directory $working_dir/"
209 cp "$deb_filename" "$working_dir/"
210 if [ -n "$genchanges" ]; then
211 echo " dpkg-genchanges"
212 local changes_filename="${deb_filename%.deb}.changes"
213 echo " copy $changes_filename into directory $working_dir/"
214 cp "$changes_filename" "$working_dir/"
218 The Debian package has been created in the current directory.
219 You can install the package as root with:
221 dpkg -i $deb_filename