OSD Packaging Guidelines
- Assiging files to packages:
- Files located in the / filesystem belong in the "-root" subpackage. These are typically files in /etc or /var
- Files only needed for software development belong in the "-devel" subpackage. These files include:
- Localization files (e.g. /usr/share/locale/*, /usr/share/gnome/help/<anything but C>) belong in "-l10n" the subpackage.
Note: in OSD, these files are repackaged into "language packs", i.e. packages that collect all l10n content for a given locale, from all OSD packages. This magic happens in SUNWzz-gnome-l10n.spec.
- File attributes:
- use %defattr (-, root, sys) in all %files root sections and use %defattr (-, root, bin) in all other %files sections
- when present in the package, specify the attributes of system directories explicitely:
%dir %attr (0755, root, bin) %{_bindir}
%dir %attr (0755, root, bin) %{_sbindir}
%dir %attr (0755, root, bin) %{_libdir}
%dir %attr (0755, root, other) %{_libdir}/pkgconfig
%dir %attr (0755, root, bin) %{_includedir}
%dir %attr (0755, root, sys) %{_datadir}
%dir %attr (0755, root, bin) %{_mandir}
%dir %attr (0755, root, other) %{_datadir}/aclocal
%dir %attr (0755, root, other) %{_datadir}/applications
%dir %attr (0755, root, other) %{_datadir}/doc
%dir %attr (0755, root, other) %{_datadir}/gnome
%dir %attr (0755, root, other) %{_datadir}/locale
%dir %attr (0755, root, other) %{_datadir}/mime-info
%dir %attr (0755, root, other) %{_datadir}/pixmaps
%attr (-, root, other) %{_datadir}/icons
%dir %attr (0755, root, sys) %{_sysconfdir}
%dir %attr (0755, root, sys) %{_localstatedir}
- Build options. Solaris.inc defines some macros for optional build elements. Use these in spec files whenever appropriate:
- %build_l10n: set to 1 if building the l10n content was requested (--with-l10n), 0 otherwise. The default is --without-l10n. (See SUNWgnome-dialog.spec for example).
- %debug_build: set to 1 if building debuggable binaries was requested (--with-debug), 0 otherwise. The default is --without-debug. (See esound.spec for example).
- %gtk_doc_option: set to --enable-gtk-doc unless building gtk-doc API docs was disabled (--without-gtk-doc), set to --disable-gtk-doc otherwise. The default is --with-gtk-doc. Use this in %files if needed:
%if %{!?_without_gtk_doc:1}%{?_without_gtk_doc:0}
%{_datadir}/gtk-doc
%endif
(See glade.spec and SUNWgnome-ui-designer.spec for example).
on 2009/10/26 12:14