Paketierungsrichtlinien für WordPress-Plugins
Anforderungen an die Paketierung
-
Verwenden Sie die Spec-Datei-Vorlage
-
Setzen Sie
plugin_nameundplugin_human_name, indem Sie die ersten beiden Zeilen entsprechend anhängen-
plugin_nameist der Kurzname, der in der URL für die Plugin-Seite auf wordpress.org verwendet wird -
plugin_human_nameist der vollständige Name des Plugins, wie er auf der Plugin-Seite auf wordpress.org angezeigt wird
-
-
Geben Sie die Versionsnummer des Pakets so ein, wie sie im .zip-Dateinamen angezeigt wird
-
Geben Sie an beiden Stellen, an denen „Die Beschreibung Ihres Plugins kommt hierher“ steht, eine Paketbeschreibung ein
Anmerkungen
-
Die Spec-Datei muss gemäß den Packaging:NamingGuidelines[Benennungsrichtlinien] den Namen
wordpress-plugin-%{plugin_name}.specerhalten -
Denken Sie daran, einen Eintrag im Changelog (Änderungsprotokoll) hinzuzufügen
Spec-Datei-Vorlage
%global plugin_name
%global plugin_human_name
Name: wordpress-plugin-%{plugin_name}
Version:
Release: 1%{?dist}
Summary: %{plugin_human_name} plugin for WordPress
Group: Applications/Publishing
# According to https://plugins.trac.wordpress.org/ all plugins are licensed
# under the GPL unless otherwise stated in the plugin source.
License: GPL-3.0-or-later
URL: https://wordpress.org/plugins/%{plugin_name}/
Source: https://downloads.wordpress.org/plugin/%{plugin_name}.%{version}.zip
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Requires: wordpress
BuildArch: noarch
%description
Die Beschreibung Ihres Plugins kommt hierher.
This package is built for use with WordPress (wordpress), not WordPress MU. Use
wordpress-mu-plugin-%{plugin_name} for WordPress MU.
%package -n wordpress-mu-plugin-%{plugin_name}
Summary: %{plugin_human_name} plugin for WordPress MU
Group: Applications/Publishing
# According to https://plugins.trac.wordpress.org/ all plugins are licensed
# under the GPL unless otherwise stated in the plugin source.
License: GPL-3.0-or-later
Requires: wordpress-mu
BuildArch: noarch
%description -n wordpress-mu-plugin-%{plugin_name}
Die Beschreibung Ihres Plugins kommt hierher.
This package is built for use with WordPress MU (wordpress-mu), not regular
WordPress. Use wordpress-plugin-%{plugin_name} for regular Wordpress.
%prep
%setup -q -c
echo 'To enable "%{plugin_human_name}", go to the administrative section
of your blog, "Plugins", and enable the plugin there.' > README.fedora
echo 'To allow users to enable "%{plugin_human_name}" for their blogs,
be sure to enable this plugin in the administrative control panel
for your website.' > README.fedora.mu
%build
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}%{_datadir}/wordpress/wp-content/plugins/
cp -a %{plugin_name} %{buildroot}%{_datadir}/wordpress/wp-content/plugins/
mkdir -p %{buildroot}%{_datadir}/wordpress-mu/wp-content/plugins/
cp -a %{plugin_name} %{buildroot}%{_datadir}/wordpress-mu/wp-content/plugins/
%clean
rm -rf %{buildroot}
%files
%doc README.fedora
%{_datadir}/wordpress/wp-content/plugins/%{plugin_name}
%files -n wordpress-mu-plugin-%{plugin_name}
%doc README.fedora.mu
%{_datadir}/wordpress-mu/wp-content/plugins/%{plugin_name}
%changelog
Want to help? Learn how to contribute to Fedora Docs ›