FreeSource: Мусорка/AltLinux/Sisyphus/NewPM/SpecFormat

Описание формата спек файлов которые будет использовать сборщик пакетов:

Небольшое лирическое отступление, формат очень сильно похож на rpm spec. Это сделано для облегчения миграции с rpm.

Пример номер 1( или простой пример). На основе пакета bbe (http://alt.linux.kiev.ua/srpm/bbe/spec) из Сизифа:

%common

Name: bbe

Version: 0.1.8

Release: alt1

%endcommon

%mainpackage

Summary: bbe – Binary block editor

Group: Text tools

License: GPL

Url: http://members.surfeu.fi/tjsa/bbe/

Source 0: %name-%version.tar.gz

Packager: Igor Zubkov <icesik@altlinux.ru>

%description

The bbe program is a sed-like editor for binary files. bbe performs basic

byte related transformations on blocks of input stream. bbe is

non-interactive command line tool and can be used as a part of a pipeline.

bbe makes only one pass over input stream.

bbe contains also grep-like features, like printing the filename, offset

and block number.

%enddescription

%endmainpackage

%prep

%setup -q

%endprep

%build

%configure

%make_build

%endbuild

%install

%make_install DESTDIR=%buildroot htmldir=%_docdir/%name-%version/ install

%__install -p AUTHORS Change Log %buildroot%_docdir/%name-%version/

%endinstall

%post

%install_info bbe.info

%endpost

%preun

%uninstall_info bbe.info

%endpreun

%files

%_bindir/bbe

%_man1dir/bbe.*

%_infodir/bbe.*

%doc %_docdir/%name-%version/*

%endfiles

%changelog

FIXME

%endchangelog

Или, ещё более глобальный пример:

%defines

%with feature1

%without feature2

%enable final

%disable debug

%enddefines

%common

Name: foopackage

Version: 1.2.3

Release: alt1

%endcommon

%mainpackage

Summary: Foo Package that rocks!

License: GPL

Group: Applications / Sound

Source 0: %name-%version.tar.bz2

URL: http://www.foopackage.org/

Maintainer: Santa Claus <sclaus@northpole.com>

%description

Foo Package

long

description

%enddescription

%endmainpackage

%prep

%setup -q

%endprep

%build

%configure

%make_build

%endbuild

%install

%make_install DESTDIR=%buildroot install

%endinstall

%files

%doc README

%_bindir/foo

%_man1dir/foo.*

%endfiles

%changelog

* Mon Nov 07 2005 Igor Zubkov <icesik@altlinux.ru> 1.2.3-alt1

– Initial build

%endchangelog

Теперь небольшое описание формата. Спек файл теперь поделен на разделы. Список разделов:

1) common

2) mainpackae

3) description

4) prep

5) build

6) install

7) files

8) changelog