self.vpoint = 4
def _action( self ):
- appcastfmt = 'http://handbrake.fr/appcast%s.xml'
+ ## add architecture to URL only for Mac
+ if fnmatch.fnmatch( build.spec, '*-*-darwin*' ):
+ url_arch = '.%s' % (arch.mode.mode)
+ else:
+ url_arch = ''
if repo.type == 'release':
self.version = '%d.%d.%d' % (self.vmajor,self.vminor,self.vpoint)
- self.url_appcast = appcastfmt % ('')
+ url_type = ''
self.build = time.strftime('%Y%m%d') + '00'
self.title = '%s %s (%s)' % (self.name,self.version,self.build)
elif repo.type == 'developer':
self.version = 'svn%d' % (repo.rev)
- self.url_appcast = appcastfmt % ('_unstable')
+ url_type = '_unstable'
self.build = time.strftime('%Y%m%d') + '01'
self.title = '%s svn%d (%s)' % (self.name,repo.rev,self.build)
else:
self.version = 'svn%d' % (repo.rev)
- self.url_appcast = appcastfmt % ('_unofficial')
+ url_type = '_unofficial'
+ self.url_appcast = appcast_fmt % ('_unofficial',appcast_arch)
self.build = time.strftime('%Y%m%d') + '99'
self.title = 'Unofficial svn%d (%s)' % (repo.rev,self.build)
+ #self.url_appbase = 'http://handbrake.fr/appcast%s.xml' % (url_type)
+ #self.url_appcast = 'http://handbrake.fr/appcast%s%s.xml' % (url_type,url_arch)
+ self.url_appbase = 'http://localhost/appcast%s' % (url_type)
+ self.url_appcast = 'http://localhost/appcast%s%s.xml' % (url_type,url_arch)
+
self.msg_end = '%s (%s)' % (self.name,repo.type)
self.fail = False
doc.add( 'CONF.args', ' '.join( args ))
doc.addBlank()
- doc.add( 'HB.title', project.title )
- doc.add( 'HB.name', project.name )
- doc.add( 'HB.name.lower', project.name_lower )
- doc.add( 'HB.name.upper', project.name_upper )
- doc.add( 'HB.acro.lower', project.acro_lower )
- doc.add( 'HB.acro.upper', project.acro_upper )
-
- doc.add( 'HB.url.website', project.url_website )
- doc.add( 'HB.url.community', project.url_community )
- doc.add( 'HB.url.irc', project.url_irc )
- doc.add( 'HB.url.appcast', project.url_appcast )
+ doc.add( 'HB.title', project.title )
+ doc.add( 'HB.name', project.name )
+ doc.add( 'HB.name.lower', project.name_lower )
+ doc.add( 'HB.name.upper', project.name_upper )
+ doc.add( 'HB.acro.lower', project.acro_lower )
+ doc.add( 'HB.acro.upper', project.acro_upper )
+
+ doc.add( 'HB.url.website', project.url_website )
+ doc.add( 'HB.url.community', project.url_community )
+ doc.add( 'HB.url.irc', project.url_irc )
+ doc.add( 'HB.url.appbase', project.url_appbase )
+ doc.add( 'HB.url.appcast', project.url_appcast )
doc.add( 'HB.version.major', project.vmajor )
doc.add( 'HB.version.minor', project.vminor )
--- /dev/null
+dnl
+dnl This file is a template used to generate various appcast.xml files.
+dnl
+changequote(<<, >>)dnl
+include(<<handbrake.m4>>)dnl
+changequote([, ])dnl
+dnl
+dnl
+dnl
+<?xml version="1.0" encoding="utf-8"?>
+<rss version="2.0" xmlns:sparkle="http://www.andymatuschak.org/xml-namespaces/sparkle">
+ <channel>
+ <title>__HB_name __BUILD_arch Appcast</title>
+ <link>__HB_url_appcast</link>
+ <description></description>
+ <language>en</language>
+ <pubDate>__BUILD_date</pubDate>
+ <lastBuildDate>__BUILD_date</lastBuildDate>
+ <item>
+ <title>__HB_name __HB_version Released</title>
+ <cli>__HB_build "__HB_version __BUILD_arch"</cli>
+ <sparkle:releaseNotesLink>__HB_url_appbase.html</sparkle:releaseNotesLink>
+ <pubDate>__BUILD_date</pubDate>
+ <description></description>
+ <enclosure
+ sparkle:version="__HB_build"
+ sparkle:shortVersionString="__HB_version __BUILD_arch"
+ url="http://handbrake.fr/rotation.php?file=__APPCAST_dmg"
+ length="__APPCAST_dmg_size"
+ type="application/octet-stream"/>
+ <sparkle:minimumSystemVersion>10.5.0</sparkle:minimumSystemVersion>
+ </item>
+ </channel>
+</rss>
-pkg.create:: $(PKG.cli.dmg) $(PKG.gui.dmg)
+pkg.create:: $(PKG.appcast) $(PKG.cli.dmg) $(PKG.gui.dmg)
+
+
+$(PKG.appcast): | $(dir $(PKG.appcast))
+$(PKG.appcast): $(BUILD/)project/handbrake.m4
+$(PKG.appcast): $(PKG.in/)appcast.xml.m4
+ $(M4.exe) -I$(BUILD/)project \
+ -D__APPCAST_dmg="$(notdir $(PKG.gui.dmg))" \
+ -D__APPCAST_dmg_size="$(shell stat -f '%z' $(PKG.gui.dmg))" \
+ $(PKG.in/)appcast.xml.m4 > $@
$(PKG.cli.dmg): | $(dir $(PKG.cli.dmg))
$(PKG.cli.dmg): | $(STAGE.cli/)
$(PKG.gui.dmg): | $(dir $(PKG.gui.dmg))
$(PKG.gui.dmg): | $(STAGE.gui/)
+ifeq (1-darwin,$(FEATURE.xcode)-$(BUILD.system))
hdiutil create -srcfolder $(STAGE.gui/) -format UDRO -mode 755 \
-volname $(basename $(notdir $@)) \
-ov $(PKG.gui.tmp.dmg)
hdiutil convert -format UDBZ -o $@ $(PKG.gui.tmp.dmg)
$(RM.exe) $(PKG.gui.tmp.dmg)
+else
+ $(TOUCH.exe) $@
+endif
pkg.cli.clean:
$(RM.exe) -fr $(STAGE.cli/)