Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

WordPress_plugin_packaging_guidelines.txt 3.3 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
  1. = WordPress plugins Packaging Guidelines
  2. https://wordpress.org/plugins/[WordPress plugins] are packaged for Fedora so that the plugin can be used for both and without requiring both.
  3. == Requirements for packaging
  4. * Use the link:#Specfile_template[specfile template]
  5. * Set `+plugin_name+` and `+plugin_human_name+` by appending the first two lines appropriately
  6. ** `+plugin_name+` is the short name used in the URL for the plugin's page on wordpress.org
  7. ** `+plugin_human_name+` is the full name of the plugin as displayed on the plugin's page on wordpress.org
  8. * Fill in the version of the package as it is displayed in the .zip filename
  9. * Fill in a package description in both places where it says "Your plugin's description goes here."
  10. === Example
  11. https://wordpress.org/plugins/stats/
  12. ....
  13. %global plugin_name stats
  14. %global plugin_human_name WordPress.com Stats
  15. ....
  16. == Notes
  17. * The spec must be named `+wordpress-plugin-%{plugin_name}.spec+` as per the Packaging:NamingGuidelines[naming guidelines]
  18. * Remember to enter a changelog entry
  19. == Specfile template
  20. ....
  21. %global plugin_name
  22. %global plugin_human_name
  23. Name: wordpress-plugin-%{plugin_name}
  24. Version:
  25. Release: 1%{?dist}
  26. Summary: %{plugin_human_name} plugin for WordPress
  27. Group: Applications/Publishing
  28. # According to https://plugins.trac.wordpress.org/ all plugins are licensed
  29. # under the GPL unless otherwise stated in the plugin source.
  30. License: GPL-3.0-or-later
  31. URL: https://wordpress.org/plugins/%{plugin_name}/
  32. Source: https://downloads.wordpress.org/plugin/%{plugin_name}.%{version}.zip
  33. BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
  34. Requires: wordpress
  35. BuildArch: noarch
  36. %description
  37. Your plugin's description goes here.
  38. This package is built for use with WordPress (wordpress), not WordPress MU. Use
  39. wordpress-mu-plugin-%{plugin_name} for WordPress MU.
  40. %package -n wordpress-mu-plugin-%{plugin_name}
  41. Summary: %{plugin_human_name} plugin for WordPress MU
  42. Group: Applications/Publishing
  43. # According to https://plugins.trac.wordpress.org/ all plugins are licensed
  44. # under the GPL unless otherwise stated in the plugin source.
  45. License: GPL-3.0-or-later
  46. Requires: wordpress-mu
  47. BuildArch: noarch
  48. %description -n wordpress-mu-plugin-%{plugin_name}
  49. Your plugin's description goes here.
  50. This package is built for use with WordPress MU (wordpress-mu), not regular
  51. WordPress. Use wordpress-plugin-%{plugin_name} for regular Wordpress.
  52. %prep
  53. %setup -q -c
  54. echo 'To enable "%{plugin_human_name}", go to the administrative section
  55. of your blog, "Plugins", and enable the plugin there.' > README.fedora
  56. echo 'To allow users to enable "%{plugin_human_name}" for their blogs,
  57. be sure to enable this plugin in the administrative control panel
  58. for your website.' > README.fedora.mu
  59. %build
  60. %install
  61. rm -rf %{buildroot}
  62. mkdir -p %{buildroot}%{_datadir}/wordpress/wp-content/plugins/
  63. cp -a %{plugin_name} %{buildroot}%{_datadir}/wordpress/wp-content/plugins/
  64. mkdir -p %{buildroot}%{_datadir}/wordpress-mu/wp-content/plugins/
  65. cp -a %{plugin_name} %{buildroot}%{_datadir}/wordpress-mu/wp-content/plugins/
  66. %clean
  67. rm -rf %{buildroot}
  68. %files
  69. %doc README.fedora
  70. %{_datadir}/wordpress/wp-content/plugins/%{plugin_name}
  71. %files -n wordpress-mu-plugin-%{plugin_name}
  72. %doc README.fedora.mu
  73. %{_datadir}/wordpress-mu/wp-content/plugins/%{plugin_name}
  74. %changelog
  75. ....
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...