DevAssistant provides an easy extendability through Assistants. These assistants are normally distributed via the DevAssistant Package Index in the form of DAP (DevAssistant Package) files. If you want to include a DAP into the main Fedora repositories, you can do so. This document outlines the rules involved.
Note: Packaged DAPs only work with DevAssistant 0.10.0 and newer. They can not be used with DevAssistant versions 0.9.* packaged in Fedora 21 and earlier.
We recommend you use the tool dap2rpm, which creates a SPEC file from your DAP automatically. It is packaged in Fedora Rawhide and 21's repositories as dap2rpm.
devassistant-dap-
, which is followed by the name of the Assistant itself, all lowercase. For example, the DAP named Openscad
will be named devassistant-dap-openscad
in the SPEC file. In this document, the second part of the name (i. e. the substring openscad
) will be referenced as %{shortname}
.devassistant-ui
. This means that the user has at least one user interface for DevAssistant installed, so they can use the DAP without futher installing anything. No version specification is necessary as DevAssistant 0.10.1 is the first version ever to provide devassistant-ui
.Requires:
devassistant
is not allowed, as that would install more packages for DA than the user may intend or need.BuildRequires:
devassistant-devel
. (for macros, installation and checking)/meta.yaml
in the section dependencies
. These names, of course, must contain the devassistant-dap-
prefix. These Requires are generated automatically by dap2rpm.BuildArch:
noarch
.%{assistant_path}
. This currently expands to /usr/share/devassistant
.%install_assistant
, %repack_assistant
, and %check_assistant
are provided by the package devassistant-devel
.setup
like other packages, it is not permissible to install the source DAP directly.%build
section using the macro %repack_assistant
. This is needed for installing and checking.%install_assistant
macrodap-list
, which can then be used in the %files
section.%install_assistant
macro with argument(s) -L
LICENSE_FILE1
LICENSE_FILE2...
. The licensing files must be stored only in the doc
directory of the DAP.%{buildroot}%{assistant_path}
in subdirectories conforming to the DAP layout, i. e. the assistants/crt/foo
directory is installed into %{buildroot}%{assistant_path}/assistants/crt/foo
.%check_assistant
macro in the %check
section, and it must pass.da
pkg
lint
-w
%{shortname}-%{version}.dap
(or similar, if your package's name differs). The run must produce no errors. Warnings are permissible.%install_assistant
was used in the %install
section, it is sufficient to provide the list of files to the %files
section like this: %files
-f
dap-files
. This is the default situation when using dap2rpm.%{assistant_path}
.%{assistant_path}/*
, list each folder separately. That includes subdirectories in %{assistant_path}/assistants
, as shown in these examples:
%{assistant_path}/assistants/*
%{assistant_path}/assistants/crt/%{shortname}
doc
directory in the DAP should be installed via the %doc
macro, in the same %{assistant_path}
directory.meta.yaml
file must be installed as %{assistant_path}/meta/%{shortname}.yaml
.devassistant-core
owns the directory %{assistant_path}
itself and the following subdirectories:
%{assistant_path}/{assistants,doc,files,icons,meta,snippets}
%{assistant_path}/{assistants}/{crt,twk,prep,extra}
%{assistant_path}/files/{crt,twk,prep,extra,snippets}
%{assistant_path}/icons/{crt,twk,prep,extra}
%{shortname}
in directories listed in point 2 and 3 of the previous bullet.
%{assistant_path}/assistant/crt/%{shortname}
%{assistant_path}/files/snippets/%{shortname}
%{shortname}.yaml
in the directories listed in point 2.%{shortname}
in the directory %{assistant_path}/doc/
%{shortname}.yaml
in the directory %{assistant_path}/meta/
%{shortname}.$SUFFIX
, where $SUFFIX
is an image file suffix (preferably PNG or SVG), in the directories listed in point 4.%global shortname openscad
Name: devassistant-dap-%{shortname}
Version: 0.0.2
Release: 1%{?dist}
Summary: Create 3D printing projects for OpenSCAD
BuildArch: noarch
License: GPLv3+ and GPLv2 with exceptions
URL: https://github.com/3DprintFIT/dap-openscad
Source0: https://dapi.devassistant.org/download/%{shortname}-%{version}.dap
BuildRequires: devassistant-devel
Requires: devassistant-ui
Requires: devassistant-dap-common_args
Requires: devassistant-dap-git
Requires: devassistant-dap-github
%description
This assistants helps you to create new OpenSCAD project for 3D printing.
We use it in our 3D printing lab to store our 3D printers on Github.
Projects created with this assistant have a `Makefile` to build the 3D models form OpenSCAD sources.
To do so, run `make`. You can also generate the images by `make images` or print plates with `make arrange`.
Observe the generated `Makefile` to see all available options.
%prep
%setup -q -n %{shortname}-%{version}
%build
%repack_assistant
%install
%install_assistant -L LICENSE NOTICE
%check
%check_assistant
%files -f dap-files
%changelog
* Thu Dec 11 2014 Tomas Radej <tradej@redhat.com> - 0.0.2-1
- Initial package
%files
%license %{assistant_path}/doc/LICENSE
%license %{assistant_path}/doc/NOTICE
%dir %{assistant_path}/doc/%{shortname}
%doc %{assistant_path}/doc/%{shortname}/README.rst
%{assistant_path}/assistants/crt/%{shortname}*
%{assistant_path}/files/crt/%{shortname}*
%{assistant_path}/icons/crt/%{shortname}*
%{assistant_path}/meta/%{shortname}.yaml