I have put my sun-j2sdk1.4_1.4.2+05_i386.deb in /files/packages
How do I say (in /script/DEFAULT/S01 ?) to install the package if the JAVA class is defined? I've tried this => In /class/DEFAULT.var : installjava="sun-j2sdk1.4"
In /script/DEFAULT/S01 : ifclass JAVA && { [ "$installjava" ] && yes '' | $ROOTCMD apt-get install $installjava }
But it doesn't work. Maybe it's not the good way to install a home-made debian package... How should I do?
Thanks,
Micha�l C.
Okay, a few things. I don't edit the default scripts because it makes upgrading harder, and this isnt how the packages stuff should be used. Try this method:
1) put the file in /files/packages/java or something (just makes it nicer to group into dirs)
2) go to /files/ and make a script called packages.sh, in it, put this:
dpkg-scanpackages packages /dev/null | gzip -9 > packages/Packages.gz
then save it, and run it from /files/
3) edit class/DEFAULT.var (or whatever class you'd like to install it) and list the package names in addpakcages=""
eg:
# grep addpackages class/DEFAULT.var
addpackages="kernel-image-2.4-386 xprt-xprintorg xprt-common acroread-debian-files acroread sun-j2re1.5 sun-j2re1.5debian sun-j2sdk1.5 sun-j2sdk1.5debian"
# ls -R files/packages .: Packages.gz acroread java xprint-xprintorg
./acroread: acroread-debian-files_0.0.6_all.deb acroread_5.09-woody0.0_i386.deb
./java:
sun-j2re1.5_1.5.0+beta2_i386.deb sun-j2re1.5debian_0.9_all.deb sun-j2sdk1.5_1.5.0+beta2_i386.deb sun-j2sdk1.5debian_0.9_all.deb
./xprint-xprintorg:
xprt-common_0.0.9.final.001-1_all.deb xprt-xprintorg_0.0.9.final.001-1_i386.deb
If it fails, try installing the deb manually on a box you've already built and make sure it doesnt fail dependencies.
Now, just start the install again it it should magically work ;-)
Hope this helps.
Nicolas.
