comparison recipes/wince/gnupg/base.py @ 373:c7d22fd36815

Base takes now the configuration options for Windows CE that are supplied by the developers using the autogen.sh script.
author Andre Heinecke <aheinecke@intevation.de>
date Mon, 21 Jun 2010 10:40:33 +0000
parents f5282057838a
children e38976f77e26
comparison
equal deleted inserted replaced
372:ef87d30468b6 373:c7d22fd36815
93 """ 93 """
94 94
95 createtarball_script = """\ 95 createtarball_script = """\
96 #! /bin/bash 96 #! /bin/bash
97 set -e 97 set -e
98
99 apt-get --assume-yes --force-yes install %(builddeps)s 98 apt-get --assume-yes --force-yes install %(builddeps)s
100 99
101 # copy the source tree to a directory that's under pbuilder control so 100 # copy the source tree to a directory that's under pbuilder control so
102 # that it gets removed along with the build environment. Otherwise we 101 # that it gets removed along with the build environment. Otherwise we
103 # end up with a directory containing files that cannot be removed by 102 # end up with a directory containing files that cannot be removed by
104 # treepkg 103 # treepkg
105 workdir=/tmp/work 104 workdir=/tmp/work
106 cp -a %(basedir)s $workdir 105 cp -a %(basedir)s $workdir
107 cd $workdir 106 cd $workdir
108 107
109 # tweak autoconf settings so that make dist produces a tar.gz, not a
110 # tar.bz2. Removing all options whose names contain 'dist' should
111 # achieve that.
112 cp Makefile.am Makefile.am.orig
113 sed -e '/AUTOMAKE_OPTIONS/ s/[a-zA-Z0-9-]*dist[a-zA-Z0-9-]*//g' \
114 Makefile.am.orig > Makefile.am
115
116 export MINGWPATH=/opt/mingw32ce 108 export MINGWPATH=/opt/mingw32ce
117 export INCLUDE=$MINGWPATH/arm-mingw32ce/include:$MINGWPATH/include:\ 109 export INCLUDE=$MINGWPATH/arm-mingw32ce/include:$MINGWPATH/include:\
118 /home/builder/wce-build/install/include:$INCLUDE 110 /home/builder/wce-build/install/include:$INCLUDE
119 export LIB=$MINGWPATH/arm-mingw32ce/lib:$MINGWPATH/lib:\ 111 export LIB=$MINGWPATH/arm-mingw32ce/lib:$MINGWPATH/lib:\
120 /home/builder/wce-build/install/lib:$LIB 112 /home/builder/wce-build/install/lib:$LIB
121 export PATH=:$PATH:$MINGWPATH/bin:$MINGWPATH/arm-mingw32ce/bin:\ 113 export PATH=:$PATH:$MINGWPATH/bin:$MINGWPATH/arm-mingw32ce/bin:\
122 $MINGWPATH/libexec/gcc/arm-mingw32ce/4.4.0: 114 $MINGWPATH/libexec/gcc/arm-mingw32ce/4.4.0:
123 115 export w32ce_root=/opt/mingw32ce
124 ./autogen.sh 116
125 ./configure --enable-maintainer-mode --host=arm-mingw32ce 117 ./autogen.sh --build-w32ce
126 118
127 # revert autoconf changes, so that the original Makefile.am ends up in 119 # revert autoconf changes, so that the original Makefile.am ends up in
128 # the tarball 120 # the tarball
129 mv Makefile.am.orig Makefile.am 121 mv Makefile.am.orig Makefile.am
130 122
131 %(make_dist_command)s 123 %(make_dist_command)s
132
133 mv *.tar.gz %(origtargz)s 124 mv *.tar.gz %(origtargz)s
134 """ 125 """
135
136 make_dist_command = "make dist"
137
138 def __init__(self, *args): 126 def __init__(self, *args):
139 super(SmartSourcePackager, self).__init__(*args) 127 super(SmartSourcePackager, self).__init__(*args)
140 self.pkgbasename = None 128 self.pkgbasename = None
141 self.pkgbaseversion = None 129 self.pkgbaseversion = None
142 self.origtargz = None 130 self.origtargz = None
152 self.determine_package_version(copied_working_copy) 140 self.determine_package_version(copied_working_copy)
153 self.pkgbasename = self.pkg_basename + "_" + self.pkgbaseversion 141 self.pkgbasename = self.pkg_basename + "_" + self.pkgbaseversion
154 self.origtargz = os.path.join(self.work_dir, 142 self.origtargz = os.path.join(self.work_dir,
155 self.pkgbasename + ".orig.tar.gz") 143 self.pkgbasename + ".orig.tar.gz")
156 144
145 # tweak automake settings so that make dist produces a tar.gz not
146 # a tar.bz2
147 run.call(cmdexpand("/bin/sh -c \"cp Makefile.am Makefile.am.orig\""),
148 cwd=copied_working_copy,suppress_output=True)
149 run.call(cmdexpand("/bin/sh -c \"sed -e '/AUTOMAKE_OPTIONS/ \
150 s/[a-zA-Z0-9-]*dist[a-zA-Z0-9-]*//g' \
151 Makefile.am.orig > Makefile.am\""), cwd=copied_working_copy,
152 suppress_output=True)
153
154 run.call(cmdexpand("/bin/sh autogen.sh"), cwd=copied_working_copy,
155 suppress_output=True)
156 orig_version = self.orig_source_version(copied_working_copy)
157 treepkg.util.replace_in_file(os.path.join(copied_working_copy,
158 "configure"),
159 re.escape(orig_version) + "-svn0",
160 orig_version + "-svn%s" % self.revision)
161
157 script = (self.createtarball_script 162 script = (self.createtarball_script
158 % dict(builddeps=" ".join(self.track.dependencies_required() 163 % dict(builddeps=" ".join(self.track.dependencies_required()
159 | self.tarball_dependencies), 164 | self.tarball_dependencies),
160 basedir=copied_working_copy, 165 basedir=copied_working_copy,
161 origtargz=self.origtargz, 166 origtargz=self.origtargz,
199 204
200 205
201 def define_gnupg_packager(pkg_basename, 206 def define_gnupg_packager(pkg_basename,
202 tarball_dependencies=("autoconf", "automake", 207 tarball_dependencies=("autoconf", "automake",
203 "texinfo", "subversion"), 208 "texinfo", "subversion"),
204 make_dist_command=None): 209 make_dist_command="make dist"):
205 """Create a SourcePackager for a GnuPG package in the caller's globals(). 210 """Create a SourcePackager for a GnuPG package in the caller's globals().
206 This is a helper function for the modules in the recipe.gnupg package. 211 This is a helper function for the modules in the recipe.gnupg package.
207 """ 212 """
208 base_class = BaseSourcePackager 213 base_class = BaseSourcePackager
209 class_attributes = dict(pkg_basename=pkg_basename) 214 class_attributes = dict(pkg_basename=pkg_basename)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)