Skip to content

Instantly share code, notes, and snippets.

@axw
Forked from WebDrake/snapcr
Last active September 2, 2016 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axw/371db15c5139c9dc64bf920f30118e19 to your computer and use it in GitHub Desktop.
Save axw/371db15c5139c9dc64bf920f30118e19 to your computer and use it in GitHub Desktop.
First draft of working snapcraft.yaml
#!/bin/sh
exec $0.real --sysroot=$SNAP $*
// This configuration file uses libconfig.
// See http://www.hyperrealm.com/libconfig/ for syntax details.
// The default group is required
default:
{
// 'switches' holds array of string that are appends to the command line
// arguments before they are parsed.
switches = [
"-I%%ldcbinarypath%%/../include/d/ldc",
"-I%%ldcbinarypath%%/../include/d",
"-L-L%%ldcbinarypath%%/../lib",
"-defaultlib=phobos2-ldc,druntime-ldc",
"-debuglib=phobos2-ldc-debug,druntime-ldc-debug"
];
};
name: ldc2
version: "1.0.0"
summary: D compiler with LLVM backend
description: LDC is a compiler for the D programming Language.
It is based on the latest DMD frontend and uses LLVM as backend.
confinement: strict
apps:
ldc2:
command: ldc2
plugs: [home]
ldmd2:
command: ldmd2
plugs: [home]
parts:
ldc:
source: git://github.com/ldc-developers/ldc.git
source-tag: v1.0.0
plugin: cmake
snap:
- '*'
- -etc/ldc2.conf
build-packages:
- ldc
- llvm-dev
- libconfig++-dev
- libcurl4-gnutls-dev
- libedit-dev
- zlib1g-dev
ldc2-conf:
plugin: dump
source: ldc2-conf
organize:
ldc2.conf: etc/ldc2.conf
gcc:
plugin: nil
stage-packages: [gcc]
organize:
usr/bin/gcc: usr/bin/gcc.real
gcc-wrapper:
plugin: dump
source: ./gcc-wrapper
organize:
gcc-wrapper: usr/bin/gcc
libc6:
plugin: nil
stage-packages: [libc6]
libc6-dev:
plugin: nil
stage-packages: [libc6-dev]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment