~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
cvs/emstar/fusd/initscripts/build-ipkg.sh


  1 #!/bin/sh
  2 
  3 PACKAGE_NAME=fusd
  4 
  5 # directories
  6 EMSTAR_DIR=/export/home/eugene/emstar
  7 OBJDIR=$EMSTAR_DIR/obj.ipaq-sa
  8 KERNELVERSION=2.4.19-rmk6-pxa1-hh30
  9 TOPDIR=/export/home/eugene/IPKGBUILD/$PACKAGE_NAME
 10 
 11 # ipkg-build location and output
 12 IPKGBUILD_DIR=/usr/local/bin
 13 IPKGBUILD_OUTPUT_DIR=$TOPDIR/../output
 14 
 15 # clear old directory
 16 rm -fr $TOPDIR
 17 
 18 # make directory structure
 19 mkdir -p $TOPDIR/lib/modules/$KERNELVERSION/misc
 20 mkdir -p $TOPDIR/etc/init.d
 21 mkdir -p $TOPDIR/usr/bin
 22 mkdir -p $IPKGBUILD_OUTPUT_DIR
 23 
 24 # copy the fusdd daemon and the kernel module
 25 cp -f $OBJDIR/fusd/kfusd.o $TOPDIR/lib/modules/$KERNELVERSION/misc
 26 cp -f $OBJDIR/fusd/fusdd   $TOPDIR/usr/bin
 27 
 28 # strip the binaries
 29 #arm-linux-strip $TOPDIR/lib/modules/$KERNELVERSION/misc/kfusd.o
 30 arm-linux-strip $TOPDIR/usr/bin/fusdd
 31 
 32 # copy the initscript
 33 cp -f $EMSTAR_DIR/fusd/initscripts/fusdd-debian $TOPDIR/etc/init.d/fusdd
 34 
 35 # generate the CONTROL directory and create the control file
 36 mkdir -p $TOPDIR/CONTROL
 37 
 38 # There is a better way to do...
 39 echo "Package: fusd" > $TOPDIR/CONTROL/control
 40 echo "Priority: optional" >> $TOPDIR/CONTROL/control
 41 echo "Version: 0.0.1" >> $TOPDIR/CONTROL/control
 42 echo "Architecture: arm" >> $TOPDIR/CONTROL/control
 43 echo "Maintainer: Eugene Shih < eugene () lcs ! mit ! edu >" >> $TOPDIR/CONTROL/control
 44 echo "Depends: libglib2.0-0" >> $TOPDIR/CONTROL/control
 45 echo "Section: net" >> $TOPDIR/CONTROL/control
 46 echo "Description: The FUSDD daemon for the ipaq" >> $TOPDIR/CONTROL/control
 47 
 48 # the conffiles ... none
 49 
 50 # generate the postinst script
 51 echo "#!/bin/sh" > $TOPDIR/CONTROL/postinst
 52 echo "" >> $TOPDIR/CONTROL/postinst
 53 echo "echo \"Starting the FUSD daemon...\"" >> $TOPDIR/CONTROL/postinst
 54 echo "/etc/init.d/fusdd start" >> $TOPDIR/CONTROL/postinst
 55 echo "/usr/sbin/update-rc.d fusdd defaults 99" >> $TOPDIR/CONTROL/postinst
 56 
 57 # generate the prerm script
 58 echo "#!/bin/sh" > $TOPDIR/CONTROL/prerm
 59 echo "" >> $TOPDIR/CONTROL/prerm
 60 echo "echo \"Stopping fusd...\"" >> $TOPDIR/CONTROL/prerm
 61 echo "/etc/init.d/fusdd stop" >> $TOPDIR/CONTROL/prerm
 62 echo "/usr/sbin/update-rc.d -f fusdd remove" >> $TOPDIR/CONTROL/prerm
 63 
 64 # generate the postrm script
 65 echo "#!/bin/sh" > $TOPDIR/CONTROL/postrm
 66 echo "" >> $TOPDIR/CONTROL/postrm
 67 echo "rm -f $TOPDIR/lib/modules/$KERNELVERSION/misc/kfusd.o" >> $TOPDIR/CONTROL/postrm
 68 
 69 # change permissions
 70 chmod +x $TOPDIR/CONTROL/prerm
 71 chmod +x $TOPDIR/CONTROL/postrm
 72 chmod +x $TOPDIR/CONTROL/postinst
 73 
 74 # execute the ipkg-build command
 75 $IPKGBUILD_DIR/ipkg-build $TOPDIR $IPKGBUILD_OUTPUT_DIR
 76 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.