Browse Source

build: Add build steps for discosrv

Jakob Borg 9 years ago
parent
commit
5fc53f59c7
2 changed files with 19 additions and 0 deletions
  1. 2 0
      .gitignore
  2. 17 0
      build.go

+ 2 - 0
.gitignore

@@ -1,5 +1,7 @@
 /syncthing
+/discosrv
 syncthing.exe
+discosrv.exe
 *.tar.gz
 *.zip
 *.asc

+ 17 - 0
build.go

@@ -93,6 +93,23 @@ var targets = map[string]target{
 			{src: "etc/linux-systemd/user/syncthing.service", dst: "deb/usr/lib/systemd/user/syncthing.service", perm: 0644},
 		},
 	},
+	"discosrv": {
+		name:       "discosrv",
+		buildPkg:   "./cmd/discosrv",
+		binaryName: "discosrv", // .exe will be added automatically for Windows builds
+		archiveFiles: []archiveFile{
+			{src: "{{binary}}", dst: "{{binary}}", perm: 0755},
+			{src: "cmd/discosrv/README.md", dst: "README.txt", perm: 0644},
+			{src: "cmd/discosrv/LICENSE", dst: "LICENSE.txt", perm: 0644},
+			{src: "AUTHORS", dst: "AUTHORS.txt", perm: 0644},
+		},
+		debianFiles: []archiveFile{
+			{src: "{{binary}}", dst: "deb/usr/bin/{{binary}}", perm: 0755},
+			{src: "cmd/discosrvREADME.md", dst: "deb/usr/share/doc/discosrv/README.txt", perm: 0644},
+			{src: "cmd/discosrvLICENSE", dst: "deb/usr/share/doc/discosrv/LICENSE.txt", perm: 0644},
+			{src: "AUTHORS", dst: "deb/usr/share/doc/discosrv/AUTHORS.txt", perm: 0644},
+		},
+	},
 }
 
 func init() {