add Gradle Debian Linux packaging

This commit is contained in:
Juraj Michalek
2014-04-28 08:10:46 +02:00
parent dcb66c1847
commit 90d862d0c7
10 changed files with 158 additions and 6 deletions

View File

@@ -0,0 +1,45 @@
import org.gradle.api.publish.maven.MavenPublication
buildscript {
repositories {
maven {
url "http://dl.bintray.com/gesellix/gradle-plugins"
}
mavenCentral()
mavenLocal()
}
dependencies {
classpath "de.gesellix:gradle-debian-plugin:12"
}
}
apply plugin: 'maven'
apply plugin: 'pkg-debian'
apply plugin: 'c'
version = "1.0.0"
executables {
hello {
}
}
task prepare(type: Copy) {
description "Copy files to Linux directory layout"
from "build/binaries/helloExecutable"
into "build/linux/usr/bin"
}
debian {
packagename = "hello-fimuni"
publications = ['fimuni']
controlDirectory = "$projectDir/src/main/resources/control"
changelogFile = "$projectDir/src/main/resources/txt/changelog.txt"
data {
def baseDir = "$buildDir/linux"
dir {
name = baseDir
}
}
}

View File

@@ -0,0 +1,7 @@
#include <stdio.h>
int main(int argc, char** argv){
printf("Hello FI MUNI!\n");
return 0;
}

View File

@@ -0,0 +1 @@
/etc/default/hello-fimuni

View File

@@ -0,0 +1,11 @@
Source: hello-fimuni
Section: web
Priority: optional
Version: 1.0.0
Maintainer: Juraj Michalek <juraj.michalek@ysoft.com>
Homepage: http://www.ysoft.com/
Package: hello-fimuni
Architecture: all
Depends:
Description: Hello FI MUNI
Example of Linux packaging for Gradle.

View File

@@ -0,0 +1,5 @@
#!/bin/sh
set -e
# Post installation script - executed at the last phase of installation

View File

@@ -0,0 +1,4 @@
#!/bin/sh
set -e
# Post remove script

View File

@@ -0,0 +1,6 @@
#!/bin/sh
set -e
# Pre-uninstallation script

View File

@@ -0,0 +1,2 @@