/[eiffelstudio]/trunk/Delivery/scripts/unix/make_debian_package
ViewVC logotype

Contents of /trunk/Delivery/scripts/unix/make_debian_package

Parent Directory Parent Directory | Revision Log Revision Log


Revision 73280 - (show annotations)
Fri May 2 00:35:28 2008 UTC (11 years, 9 months ago) by fivaa
File size: 2405 byte(s)
Added desktop support for linux packages (menu entry with logo). Removed README file since there is a wiki page now.
1 #!/bin/sh
2 set -e
3
4 if [ ! "$ISE_EIFFEL" ]; then
5 echo '$ISE_EIFFEL not defined. Cannot continue'
6 exit 1
7 fi
8
9 if [ ! "$ISE_PLATFORM" ]; then
10 echo '$ISE_PLATFORM not defined. Cannot continue'
11 exit 1
12 fi
13 echo "Using EiffelStudio delivery in $ISE_EIFFEL"
14
15
16 # Exctract EiffelStudio version
17 export VERSION=`$ISE_EIFFEL/studio/spec/$ISE_PLATFORM/bin/ec -version | sed "s/^[A-Za-z ]*\([0-9\.]\+\).*/\1/"`
18 MAJOR_NUMBER=`echo $VERSION | sed "s/^\([0-9]\).*/\1/"`
19 MINOR_NUMBER=`echo $VERSION | sed "s/^[0-9].\([0-9]\).*/\1/"`
20 echo "EiffelStudio version $VERSION will be used for debian package"
21
22
23 # Define packaging directories
24 export PRODUCT=eiffelstudio-$MAJOR_NUMBER.$MINOR_NUMBER
25 export PACKAGING_DIR=`pwd`/packaging
26 export DEBIAN_DIR=$PACKAGING_DIR/debian
27 DOCS_DIR=/usr/share/doc/$PRODUCT/docs
28
29
30 # Create unix layout in debian directoy
31 ./make_unix_layout $DEBIAN_DIR/$PRODUCT
32
33
34 # NOTE: this will be moved to the make_unix_layout script
35 mkdir -p $DEBIAN_DIR/$PRODUCT/usr/share/applications
36 mkdir -p $DEBIAN_DIR/$PRODUCT/usr/share/icons
37 cp $PACKAGING_DIR/desktop $DEBIAN_DIR/$PRODUCT/usr/share/applications/eiffelstudio.desktop
38 cp $PACKAGING_DIR/logo.png $DEBIAN_DIR/$PRODUCT/usr/share/icons/eiffelstudio.png
39
40
41 # Prepare debian packaging files
42 sh $DEBIAN_DIR/control.sh
43 sh $DEBIAN_DIR/changelog.sh
44 cp $PACKAGING_DIR/license $DEBIAN_DIR/copyright
45 echo '#!/bin/sh' > $DEBIAN_DIR/$PRODUCT.postinst
46 echo '#!/bin/sh' > $DEBIAN_DIR/$PRODUCT.prerm
47 sh $PACKAGING_DIR/postinstall.sh >> $DEBIAN_DIR/$PRODUCT.postinst
48 sh $PACKAGING_DIR/preremove.sh >> $DEBIAN_DIR/$PRODUCT.prerm
49
50 cd $DEBIAN_DIR
51
52
53 # First we check if there are any docs (architecture independent)
54 if test -d "$PRODUCT$DOCS_DIR"; then
55 mkdir -p $PRODUCT-doc$DOCS_DIR
56 mv $PRODUCT$DOCS_DIR/* $PRODUCT-doc$DOCS_DIR/
57 rm -rf $PRODUCT$DOCS_DIR
58
59 debuild --check-dirname-level 0 binary-indep
60 echo Finished building package $PRODUCT-doc
61
62 # Clean up doc related build files
63 rm -rf $DEBIAN_DIR/$PRODUCT-doc
64 else
65 echo "$0: No $DOCS_DIR present, $PRODUCT-doc package will not be created"
66 fi
67
68
69 # Then we build the main package (architecture dependent)
70 debuild --check-dirname-level 0 binary-arch
71 echo Finished building package $PRODUCT
72
73
74 # Clean up all build files
75 cd ../
76 dh_clean
77 rm -r $DEBIAN_DIR/$PRODUCT
78 rm $DEBIAN_DIR/$PRODUCT.postinst
79 rm $DEBIAN_DIR/$PRODUCT.prerm
80 rm $DEBIAN_DIR/copyright
81 rm $DEBIAN_DIR/control
82 rm $DEBIAN_DIR/changelog
83

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.23