Skip to content

rednoah/ant-spk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ant-spk

Github Releases GitHub release

Ant Task for creating SPK packages for Synology NAS.

Introduction

I've found the Synology SDK tools for creating and signing SPK packages overly difficult to use and and terrible to automate. So here's an Apache Ant task to handle build automation of SPK packages in an easy to maintain and completely platform-independent manner.

Ant SPK Task

  • Much more easy to use than whats in the official Synology SDK docs & tools
  • Automatically create and sign your SPK packages in your automated Ant build
  • Works on Windows, Mac and Linux (including Synology DSM) and any other device that can run Java 8

Have a quick look at the Synology DSM 3rd Party Apps Developer Guide and read the Package Structure section to learn more on how SPK packages work.

Example

<project name="Ant SPK Task" basedir="." default="spk" xmlns:syno="antlib:net.filebot.ant.spk">

	<target name="spk">

		<syno:spk destdir="dist" name="helloworld" version="0.1" arch="noarch">
			<info name="displayname" value="Hello World" />
			<info name="description" value="Hello World package built with ant-spk" />

			<info name="maintainer" value="ant-spk" />
			<info name="maintainer_url" value="https://github.com/rednoah/ant-spk" />

			<info name="dsmappname" value="org.example.HelloWorld" />
			<info name="dsmuidir" value="dsm" />

			<icon file="app/dsm/images/icon_64.png" />
			<icon size="256" file="app/dsm/images/icon_256.png" />

			<wizard dir="spk/wizard" />
			<scripts dir="spk/scripts" filemode="755" />

			<package dir="app" includes="**/*.sh" filemode="755" />
			<package dir="app" excludes="**/*.sh" />
		</syno:spk>

	</target>

</project>

Downloads

ant-spk is available on Maven Central. Use Apache Ivy to retrieve all the dependencies:

<dependency org="net.filebot" name="ant-spk" rev="0.7.1" />

Build

ant-spk uses the Gradle 6.9 build tool. Call gradle example to fetch all dependencies and build the example project.

Real World Examples

ant-spk is used to automatically build .spk packages for the FileBot project, so check out filebot-node build.xml or java-installer build.xml for a set of more comprehensive examples. 🚀