Not logged in

Package Specification File

7. Designing a Package Manager
7.1 Introduction
7.2 Package Specification File

Package Specification File Introduction

A spec file defines all the commands and values that are required for creating a package, everything from the name and version number to the actual commands used to build the program you are packaging.

Specfile Example

# Hydra Architecture Package Spec v0.1 | Flac
Name: flac
Version: 1.3.0
Release: 1
License: BSD

Group: Multimedia/Codecs
Type: Library

DownloadSize: 1.1MB
Checksum: 13b5c214cee8373464d3d65dee362cdd

SBU: 0.3

# Package Summary
Summary: FLAC stands for Free Lossless Audio Codec.

# Package Description
Description: >
  FLAC stands for Free Lossless Audio Codec, an audio format similar
  to MP3, but lossless, meaning that audio is compressed in FLAC without 
  any loss in quality.

# Patches
# Required Dependencies
  R1: clang
  R2: musl
# Optional Dependencies
  O1: ogg
  O2: nasm

Packager: Steven Starr 
Vendor: Hydra Architecture

# Premake4 Build Script
Build: >
  solution "MyApplication"
  configurations { "Debug", "Release" }
  project "MyApplication"
  kind "ConsoleApp"
  language "C++"
  files { "**.h", "**.cpp" }
  configuration "Debug"
  defines { "DEBUG" }
  flags { "Symbols" }
  configuration "Release"
  defines { "NDEBUG" }
  flags { "Optimize" } 

# Change Log
Changelog: >
  Mon Jan 6 2014 Steven Starr 
  Initial Package Spec Creation

Defining Package Information

Most of the package information you need to enter into a spec file fleshes out the information you can query for a given package, such as the name, version, and release information, along with a longer description and a one-line summary. This gets a little more complicated when you set build locations, name source files, and name patches. The following sections cover how to specify the package information.