3 E_BASE_REPO="http://svn.enlightenment.org/svn/e"
4 E_TRUNK_REPO="$E_BASE_REPO/trunk"
5 E_OLD_REPO="$E_BASE_REPO/OLD"
6 E_PYTHON_SUFIX="BINDINGS/python"
7 E_PYTHON_REPO="$E_TRUNK_REPO/$E_PYTHON_SUFIX"
8 E_OLD_PYTHON_REPO="$E_OLD_REPO/$E_PYTHON_SUFIX"
9 E_PROTO_REPO="$E_TRUNK_REPO/PROTO"
11 [ -z $E_SVN_REV ] && E_SVN_REV="44144"
13 TMP_DIR="maemo-efl-deb-src-$E_SVN_REV"
14 VERSIONS_DIR="$TMP_DIR/versions"
34 ALL_MODULES+=("python-evas"
46 MAEMO_REPO="extras-devel"
48 MAEMO_EFL_BASE_REPO="https://garage.maemo.org/svn/maemo-efl/trunk/"
51 echo " ERROR" && exit 1
55 if [ -d $TMP_DIR ]; then
56 echo -n "Cleaning up ..."
57 rm -rf $TMP_DIR || exit_error
61 echo -n "Creating build dir ..."
62 mkdir -p $TMP_DIR || exit_error
66 checkout_repositories(){
67 echo "Checking out repositories ..."
68 for module in ${ALL_MODULES[@]};do
75 python-etk|python-epsilon)
76 REPO="$E_OLD_PYTHON_REPO"
79 REPO="$E_BASE_REPO/TMP/st"
85 cp -r $module $TMP_DIR > /dev/null 2>&1 && echo " ... OK" || exit_error
99 svn co $REV $REPO/$module $TMP_DIR/$module > /dev/null 2>&1 || exit_error
101 rm -rf $TMP_DIR/$module/debian
103 cp -r $module/debian $TMP_DIR/$module/debian > /dev/null 2>&1 || exit_error
107 echo -n "Cleaning up repositories ..."
108 rm -rf `find $TMP_DIR -name .svn -type d`
109 rm -rf `find $TMP_DIR -name .git -type d`
114 echo "Updating changelogs ..."
115 for module in ${ALL_MODULES[@]};do
116 echo -n " $module .."
120 VERSION=`grep AC_INIT $TMP_DIR/evas/configure.ac | cut -d[ -f3 | cut -d] -f1 || exit_error`
123 VERSION=`grep version $TMP_DIR/$module/setup.py | cut -d\' -f2 || exit_error`
126 VERSION=`grep AC_INIT $TMP_DIR/$module/configure.ac | cut -d[ -f3 | cut -d] -f1 || exit_error`
131 dch --force-distribution -b -c $TMP_DIR/$module/debian/changelog -v $VERSION+svn$E_SVN_REV-$MAEMO_REV -D $MAEMO_REPO "SVN snapshot release $E_SVN_REV" > /dev/null 2>&1 || exit_error
132 echo " `head -n1 $TMP_DIR/$module/debian/changelog`"
137 if [ ! -d $VERSIONS_DIR ]; then
138 echo -n "Creating versions dir $VERSIONS_DIR ..."
139 mkdir -p $VERSIONS_DIR || exit_error
143 echo "Generating version files ..."
144 for module in ${ALL_MODULES[@]};do
145 VERSION=`dpkg-parsechangelog -l$TMP_DIR/$module/debian/changelog | grep Version: | cut -d" " -f2 || exit_error`
146 echo " $module ... $VERSION"
147 echo "$VERSION" > $VERSIONS_DIR/"$module"_version
152 echo "Generating control files ..."
153 for module in ${ALL_MODULES[@]}; do
154 echo -n " $module ..."
155 if [ -e $TMP_DIR/$module/debian/control.in ]; then
156 TO_REPLACE=`grep -o -E '@([A-Z]|[0-9])+((-|_)*([A-Z]|[0-9]))*_VERSION@' $TMP_DIR/$module/debian/control.in | cut -d @ -f 2 | sort -u`
157 cp $TMP_DIR/$module/debian/control.in $TMP_DIR/$module/debian/control.temp
159 for replacement in $TO_REPLACE; do
160 replacement_lowercase=`echo $replacement | tr "[:upper:]" "[:lower:]"`
161 version_file=$VERSIONS_DIR/$replacement_lowercase
162 if [ ! -e $version_file ]; then
163 echo -n " Could not find a replacement for $replacement" && exit_error
165 version_number=`cat $version_file`
166 echo -n " $replacement: $version_number"
167 sed -i s/@$replacement@/$version_number/g $TMP_DIR/$module/debian/control.temp
170 mv $TMP_DIR/$module/debian/control.temp $TMP_DIR/$module/debian/control
178 echo "Generating source packages ..."
179 for module in ${ALL_MODULES[@]}; do
181 cd $TMP_DIR/$module || exit_error
183 dpkg-buildpackage -rfakeroot -us -uc -sa -d -S -I.git -I.gitignore -I.svn -I.svnignore -ICVS -I.cvsignore > /dev/null 2>&1|| exit_error
185 cd - > /dev/null 2>&1 || exit_error
191 checkout_repositories
196 echo "All done. Packages in $TMP_DIR"