Ticket #5875: tap2rpm-hestern.patch
| File tap2rpm-hestern.patch, 1.5 KB (added by hestern, 9 months ago) |
|---|
-
tap2rpm.py
old new 35 35 [ -r /etc/default/%(rpm_file)s ] && . /etc/default/%(rpm_file)s 36 36 37 37 # check for required files 38 if [ ! -x /usr/bin/twistd]38 if [ ! -x %(twistd) ] 39 39 then 40 echo "$0: Aborting, no /usr/bin/twistdfound"40 echo "$0: Aborting, no %(twistd) found" 41 41 exit 0 42 42 fi 43 43 if [ ! -r "$file" ] … … 95 95 Group: Networking/Daemons 96 96 Source: %(tarfile_basename)s 97 97 BuildRoot: %%{_tmppath}/%%{name}-%%{version}-root 98 Requires: /usr/bin/twistd98 Requires: %(twistd) 99 99 BuildArch: noarch 100 100 101 101 %%description … … 237 237 238 238 tapFileBase = os.path.basename(config['tapfile']) 239 239 240 twistdPath = os.path.join(os.path.dirname(sys.argv[0]), 'twistd') 241 240 242 initFileInfo = tarfile.TarInfo( 241 243 os.path.join( 242 244 config['release-name'], … … 248 250 initFileRealData = initFileData % { 249 251 'tap_file': tapFileBase, 250 252 'rpm_file': config['release-name'], 253 'twistd': twistdPath, 251 254 'twistd_option': config['twistd_option'], 252 255 } 253 256 initFileInfo.size = len(initFileRealData) … … 279 282 'date': time.strftime('%a %b %d %Y', time.localtime(time.time())), 280 283 'maintainer': config['maintainer'], 281 284 'long_description': config['long_description'], 285 'twistd': twistdPath, 282 286 } 283 287 specHandle.write(specFileRealData) 284 288 specHandle.close()
