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

Contents of /trunk/Delivery/scripts/unix/make_rpm_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: 2611 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
5 if [ ! "$ISE_EIFFEL" ]; then
6 echo '$ISE_EIFFEL not defined. Cannot continue'
7 exit 1
8 fi
9
10 if [ ! "$ISE_PLATFORM" ]; then
11 echo '$ISE_PLATFORM not defined. Cannot continue'
12 exit 1
13 fi
14 echo "Using EiffelStudio delivery in $ISE_EIFFEL"
15
16
17 # Exctract EiffelStudio version
18 export VERSION=`$ISE_EIFFEL/studio/spec/$ISE_PLATFORM/bin/ec -version | sed "s/^[A-Za-z ]*\([0-9\.]\+\).*/\1/"`
19 MAJOR_NUMBER=`echo $VERSION | sed "s/^\([0-9]\).*/\1/"`
20 MINOR_NUMBER=`echo $VERSION | sed "s/^[0-9].\([0-9]\).*/\1/"`
21 echo "EiffelStudio version $VERSION will be used for debian package"
22
23
24 # Define environment variables
25 export PRODUCT=eiffelstudio-$MAJOR_NUMBER.$MINOR_NUMBER
26 export PACKAGING_DIR=`pwd`/packaging
27 export RPM_DIR=$PACKAGING_DIR/rpm
28 DOCS_DIR=/usr/share/doc/$PRODUCT/docs
29 RPMMACRO=~/.rpmmacros
30
31
32 # Create RPM macro file in ./rpmmacros
33 if test -f $RPMMACRO; then
34 mv $RPMMACRO /tmp/.rpmmacros$$
35 fi
36 echo %_topdir $RPM_DIR > $RPMMACRO
37 echo %_tmppath $RPM_DIR/tmp >> $RPMMACRO
38 echo %_use_internal_dependency_generator 0 >> $RPMMACRO
39
40
41 # Create unix layout in RPM BUILD directory
42 ./make_unix_layout $RPM_DIR/eiffelstudio
43
44
45 # NOTE: this will be moved to the make_unix_layout script
46 mkdir -p $RPM_DIR/eiffelstudio/usr/share/applications
47 mkdir -p $RPM_DIR/eiffelstudio/usr/share/icons
48 cp $PACKAGING_DIR/desktop $RPM_DIR/eiffelstudio/usr/share/applications/eiffelstudio.desktop
49 cp $PACKAGING_DIR/logo.png $RPM_DIR/eiffelstudio/usr/share/icons/eiffelstudio.png
50
51 # Prepare spec files
52 sh $RPM_DIR/eiffelstudio.spec.sh
53 cp $PACKAGING_DIR/license $RPM_DIR/eiffelstudio/usr/share/doc/$PRODUCT/LICENSE
54
55
56 # If we have a $DOCS_DIR move it to a seperate
57 # directory and build noarch doc package
58 if test -d $RPM_DIR/eiffelstudio$DOCS_DIR; then
59 sh $RPM_DIR/eiffelstudio-doc.spec.sh
60 mkdir -p $RPM_DIR/eiffelstudio-doc$DOCS_DIR
61 mv $RPM_DIR/eiffelstudio$DOCS_DIR/* $RPM_DIR/eiffelstudio-doc$DOCS_DIR
62 rm -r $RPM_DIR/eiffelstudio$DOCS_DIR
63 rpmbuild -bb $RPM_DIR/eiffelstudio-doc.spec
64
65 # Clean up documentation specific build files
66 rm $RPM_DIR/eiffelstudio-doc.spec
67 rm -r $RPM_DIR/eiffelstudio-doc
68 else
69 echo "No $RPM_DIR/eiffelstudio$DOCS_DIR, $PRODUCT-doc package will not be created"
70 fi
71
72
73 # Build main package
74 rpmbuild -bb $RPM_DIR/eiffelstudio.spec
75
76
77 # Move all generated .rpm files to current directory
78 find $RPM_DIR/RPMS -type f | xargs mv -t ./
79
80
81 # Reset RPM macro file
82 rm $RPMMACRO
83 if test -f /tmp/.rpmmacros$$; then
84 mv /tmp/.rpmmacros$$ $RPMMACRO
85 fi
86
87
88 # Clean up RPM directory
89 rm $RPM_DIR/eiffelstudio.spec
90 rm -r $RPM_DIR/eiffelstudio
91 rm -r $RPM_DIR/tmp
92 rm -r $RPM_DIR/RPMS/*
93

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.23