Skip to content

Instantly share code, notes, and snippets.

@fuzzy
Created May 23, 2016 19:01
Show Gist options
  • Save fuzzy/c521a106c9e0c5eb02942532c394a48c to your computer and use it in GitHub Desktop.
Save fuzzy/c521a106c9e0c5eb02942532c394a48c to your computer and use it in GitHub Desktop.
---
# This file of course builds nothing, but is here to show you how a specfile
# is written. It's pretty standard fare, nothing crazy or wildly different from
# things like a rpm specfiles, or homebrew recipes (altho not in ruby).
#
# Some rules to keep in mind:
#
# 1) All options are required.
# 2) Any value you have defined below, is available as a macro, there are other
# macros available by default, they will documented elsewhere, and are referenced
# with the syntax: $(macro) and it should be noted that macro names are *ALWAYS*
# lower case.
# 3) Any environment variable can be referenced with the syntax: ${ENVVAR}
# Some basic metadata
Author: "Mike 'Fuzzy' Partin"
Email: "[email protected]"
License: "BSD 2-clause"
Homepage: "http://www.example.com"
Package: "example"
Version: "0.0.1"
# Record our sources, there may be multiple uri's listed for the same file,
# and the sha1 recorded only once. sha1 values are required for all patches
# and extra data files that are requested however.
Sources:
Sha1: "6173d7238b5a7116439295086608ce9b98c73565"
Uris:
- "http://www.example.com/$(package)-$(version).tar.gz"
- "http://www.example-mirror.com/$(packages)-$(version).tar.gz"
Patches:
-
- "http://www.example.com/$(package)-bugfixes1.patch"
- "8b10e7643e17e99c10458121d1371637e2de8737"
-
- "http://www.othersite.com/$(package)-userfeature.patch"
- "0abe0121f86c858de56318bb2248a2663863947a"
# This could be anything such as arwork, icon packs or whatever
Data: []
# This is a simple list of strings in the format <packagename>-<packageversion>
# which for example may look like: long_name-0.1.2:git or name-2.3.4
Requires: []
# If this is set to true, then all dependencies will be installed under the package
# root, and included in any binpkg. (This makes for nice deployments)
Inclusive: false
# If this is set to true, a binpkg will automatically be built (This is overridable
# on the commandline)
Binpkg: false
Setup:
Command: "hostname"
Environment:
-
- "PATH"
- "${PATH}"
Arguments:
- ">/tmp/thisnode"
Directory: "/"
User: ""
Configure:
Command: "hostname"
Environment:
-
- "PATH"
- "${PATH}"
Arguments:
- ">/tmp/thisnode"
Directory: "/"
User: ""
Compile:
Command: "hostname"
Environment:
-
- "PATH"
- "${PATH}"
Arguments:
- ">/tmp/thisnode"
Directory: "/"
User: ""
Install:
Command: "make install"
Environment:
-
- "PATH"
- "${PATH}"
Arguments: []
Directory: "/"
User: ""
Teardown:
Command: "hostname"
Environment:
-
- "PATH"
- "${PATH}"
Arguments:
- ">/tmp/thisnode"
Directory: "/"
User: ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment