From Fedora Project Wiki

(Initial specfile template page for Zikula module packaging)
 
(Fix spaces/tabs)
Line 5: Line 5:
== Template ==
== Template ==
<pre>
<pre>
%global zikula_base %{_datadir}/zikula
%global zikula_base         %{_datadir}/zikula
%global zikula_moddir %{zikula_base}/modules
%global zikula_moddir       %{zikula_base}/modules
%global zikula_modname <<<YOUR_MODULE_NAME>>>
%global zikula_modname     crpTag


Name:          zikula-module-%{zikula_modname}
Name:          zikula-module-%{zikula_modname}
Line 15: Line 15:


Group:          Applications/Publishing
Group:          Applications/Publishing
License:        GPLv2      
License:        GPLv2
# CHANGE THE LINE BELOW TO THE TOP LEVEL PAGE FOR THE MODULE
URL:            http://code.zikula.org/crptag
URL:            http://code.zikula.org/crptag
# CHANGE THE LINE BELOW TO THE URL FOR RETRIEVING THE ZIP FILE FROM THE ZIKULA TRAC SITE
# http://code.zikula.org/crptag/changeset/114/tags/crpTag_0.1.3?old_path=%2F&format=zip
# http://code.zikula.org/crptag/changeset/114/tags/crpTag_0.1.3?old_path=%2F&format=zip
Source0:        %{zikula_modname}_%{version}.zip
Source0:        %{zikula_modname}_%{version}.zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildArch:     noarch
#BuildRequires:   
#BuildRequires:   
Requires:      zikula
Requires:      zikula

Revision as of 19:39, 14 June 2009

The following template can be used to create new Zikula module packages. Substitute the name for the Zikula module, in the correct case as used throughout the Zikula web site, where you see <<<YOUR_MODULE_NAME>>>.

Look for dependencies
Before you submit a package, you must go through the source and ensure that all dependency libraries are separately packaged in Fedora, and eliminated from the Zikula module package. Consult the Fedora Docs team for help if you run into trouble.

Template

%global zikula_base         %{_datadir}/zikula
%global zikula_moddir       %{zikula_base}/modules
%global zikula_modname      crpTag

Name:           zikula-module-%{zikula_modname}
Version:        0.1.3
Release:        1%{?dist}
Summary:        Simple Zikula component for tagging items, based on hooks

Group:          Applications/Publishing
License:        GPLv2
URL:            http://code.zikula.org/crptag
# http://code.zikula.org/crptag/changeset/114/tags/crpTag_0.1.3?old_path=%2F&format=zip
Source0:        %{zikula_modname}_%{version}.zip
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
#BuildRequires:  
Requires:       zikula

%description
crpTag is a simple Zikula component for tagging items, based on hooks.


%prep
%setup -qn tags/%{zikula_modname}_%{version}
# Remove empty index.html and others
find -size 0 | xargs rm -f


%build


%install
rm -rf $RPM_BUILD_ROOT
%{__mkdir} -p $RPM_BUILD_ROOT/%{zikula_moddir}/%{zikula_modname} 
cp -pr . $RPM_BUILD_ROOT/%{zikula_moddir}/%{zikula_modname}
rm -rf $RPM_BUILD_ROOT/%{zikula_moddir}/%{zikula_modname}/pndocs


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc pndocs/changelog.txt pndocs/license.txt pndocs/credits.txt
%{zikula_moddir}/%{zikula_modname}


%changelog
* Sun Jun 14 2009 Fedora Docs Team <docs@fedoraproject.org> - 0.1.3-1
- Initial RPM release