Mercurial > mplayer.hg
annotate DOCS/tech/binary-packaging.txt @ 37183:eaa58d991a06
Use intptr_t to cast a pointer.
Avoids warnings especially when compiling for 64-bit Windows.
Patch by Stephen Sheldon [sfsheldo gmail].
author | reimar |
---|---|
date | Wed, 17 Sep 2014 16:55:09 +0000 |
parents | 3b50a42ee737 |
children |
rev | line source |
---|---|
14267 | 1 ________________________________________________ |
2 How to make good binary package(s) of MPlayer? | |
3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
4 by Dominik 'Rathann' Mierzejewski | |
5 | |
6 About this document | |
7 ~~~~~~~~~~~~~~~~~~~ | |
8 | |
9 With the release of MPlayer 0.90pre9, all licensing issues have been | |
10 eliminated and all code is licensed under the GPL, which allows | |
11 independent packagers to create and distribute binary packages. At first, | |
12 this was discouraged by some of the developers, but the users' demand for | |
13 ready-to-use binary packages convinced some people to create them. | |
14 Unfortunately, many currently available packages are crippled, include | |
15 their own obsolete config files or are mispackaged in some other way. This | |
16 document aims to establish a common set of packaging guidelines so that | |
17 proper official binary packages for various Linux distributions and other | |
18 operating systems can be maintained. | |
19 | |
20 | |
21 Conventions | |
22 ~~~~~~~~~~~ | |
23 Whenever you see "MUST", it means that following the mentioned guideline | |
24 is required. Whenever you see "SHOULD", it means that following the | |
25 guideline is highly recommended, but not required. | |
26 | |
27 | |
28 Minimum feature set | |
29 ~~~~~~~~~~~~~~~~~~~ | |
30 Due to MPlayer design, it is impossible to simply include all possible | |
31 features and enable or disable them at runtime. That is why packagers | |
32 SHOULD avoid "dependency hell" by retaining a reasonable, limited default | |
33 feature set. After some discussion with other developers, we agreed that | |
34 the following features MUST be included in any official binary package: | |
35 | |
36 * audio/video output | |
37 - fbdev | |
38 - JPEG/PNG/TGA | |
39 - (X)MGA | |
16950 | 40 - OSS |
14267 | 41 - tdfxfb |
42 - (c/x)vidix | |
43 - X11/Xvideo | |
44 | |
45 * codecs | |
46 - libavcodec(internal) | |
19898
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
47 - RealPlayer codecs support (*) |
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
48 - Win32/VfW/DShow/QT codecs support (*) |
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
49 - XAnim codecs support (*) |
14267 | 50 |
51 * general: | |
52 - FreeType fonts support | |
53 - HTML documentation | |
54 - large file support | |
55 - man page(s) | |
56 | |
57 * input/demuxers: | |
28959 | 58 - DVD(libdvdread4/libdvdnav) |
14267 | 59 - streaming |
60 - Matroska(internal) | |
61 - (S)VCD | |
62 - tv(v4l/v4l2) | |
63 | |
19898
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
64 (*) if available for your OS/hardware |
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
65 |
14267 | 66 There is great demand for the GUI, so it SHOULD be included, but it MUST |
67 come as a separate package (see Tips and Tricks for details). | |
68 | |
69 Including other features, like LIVE.COM streaming or JACK support, is | |
70 acceptable. They SHOULD, however, be build-time configurable, with the | |
71 default build configuration containing the above set. | |
72 | |
73 It seems there are some packages in the wild which lack included docs. | |
74 This is VERY BAD, as it forces users to look for outside support when most | |
75 of the common problems are easy to solve and are already described in the | |
76 docs, thus increasing the number of repeated posts in MPlayer mailing | |
77 lists. Binary packages MUST include both the man page and HTML | |
78 documentation. Translated versions SHOULD be included, even if your | |
79 package management system does not provide specific support for | |
80 internationalization. | |
81 | |
19899
b748e4e64b50
Allow shared libavcodec, but explain the implications.
rathann
parents:
19898
diff
changeset
|
82 Libavcodec MUST always be in the latest development version and it SHOULD |
14268 | 83 be linked statically into the mplayer binary, because MPlayer requires a |
19899
b748e4e64b50
Allow shared libavcodec, but explain the implications.
rathann
parents:
19898
diff
changeset
|
84 recent libavcodec snapshot. It is acceptable to use a shared (again, recent) |
b748e4e64b50
Allow shared libavcodec, but explain the implications.
rathann
parents:
19898
diff
changeset
|
85 version of libavcodec, but you must be aware that this disables some of |
b748e4e64b50
Allow shared libavcodec, but explain the implications.
rathann
parents:
19898
diff
changeset
|
86 MPlayer's functions (for example, some postprocessing filters) and sacrifices |
b748e4e64b50
Allow shared libavcodec, but explain the implications.
rathann
parents:
19898
diff
changeset
|
87 speed. |
14267 | 88 |
19790 | 89 Support for binary codecs SHOULD be present to the extent that the combination |
90 of operating system and CPU architecture permits, but it MUST NOT result in a | |
91 hard dependency on a binary codecs package. MPlayer is fully functional without | |
19783 | 92 external binary codecs. If you package binary codecs yourself, package the |
93 essential codecs package, not the all codecs package. | |
94 | |
19898
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
95 Bitmap fonts are deprecated, don't package them. Use scalable (Type1/TrueType) |
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
96 fonts instead. |
19783 | 97 |
14267 | 98 |
99 File locations | |
100 ~~~~~~~~~~~~~~ | |
101 In general, you SHOULD follow your distribution guidelines. For example, | |
14268 | 102 for Red Hat and Fedora RPMs I am using FHS-compliant paths: |
14267 | 103 |
104 /etc/mplayer/ system-wide configs | |
105 /usr/bin/ binaries | |
106 /usr/lib/codecs/ binary codecs | |
28959 | 107 /usr/lib64/codecs/ binary codecs on 64bit Linux |
14267 | 108 /usr/share/doc/mplayer-version/ docs |
109 /usr/share/man/man1/ man page | |
110 /usr/share/man/XX/man1/ translated man page | |
17974
9a5a62f480e6
Rename the default GUI skins directory from 'Skin' to 'skins', keeping
diego
parents:
16950
diff
changeset
|
111 /usr/share/mplayer/skins/ GUI skins |
14267 | 112 |
19783 | 113 You MUST NOT include the codecs.conf file in your package. It is useful |
14267 | 114 only for development purposes and often causes obscure problems for users. |
115 | |
19673
e7cd9c08d1d9
Remind packagers not to use deprecated codecs and skins paths.
diego
parents:
17974
diff
changeset
|
116 Please avoid using the deprecated paths for binary codecs (/usr/lib/win32/) |
e7cd9c08d1d9
Remind packagers not to use deprecated codecs and skins paths.
diego
parents:
17974
diff
changeset
|
117 and skins (/usr/share/mplayer/Skin/). |
e7cd9c08d1d9
Remind packagers not to use deprecated codecs and skins paths.
diego
parents:
17974
diff
changeset
|
118 |
14267 | 119 |
120 One package or many packages? | |
121 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
122 Although it is tempting to simply provide a single all-in-one package, | |
123 I think it is best to split MPlayer into several packages. It may be | |
124 a little more troublesome for less clueful users, but it allows you to | |
14268 | 125 install only what you need. This is the layout I am using for Red Hat and |
14267 | 126 Fedora RPMs: |
127 | |
128 mencoder contains MEncoder binary (mencoder) | |
129 mplayer contains MPlayer binary without GUI (mplayer), | |
130 config files, man pages and documentation; | |
131 required by mplayer-gui | |
132 mplayer-codecs-* contain binary codecs available from MPlayer's site | |
133 mplayer-gui contains MPlayer binary with GUI (gmplayer); | |
16950 | 134 contains default skin (Blue) |
14267 | 135 mplayer-skin-* contain various MPlayer GUI skins |
136 | |
137 There is no strict policy for now, just use your common sense. | |
138 | |
139 | |
140 Compilation | |
141 ~~~~~~~~~~~ | |
142 While it is acceptable to provide packages optimized for specific CPUs, | |
143 you MUST provide at least one "lowest common denominator" package set | |
14268 | 144 that will work on all CPUs. This means it MUST be configured with the |
14267 | 145 --enable-runtime-cpudetection option. Building for specific CPUs requires |
146 disabling this option, but try to make sure that users cannot accidentally | |
147 install a package not suitable for their CPU. With RPMs, for example, this | |
14268 | 148 is handled automatically, when building with the "--target arch" rpm option. |
14267 | 149 |
150 Compiler flags MUST be set to either configure-generated CFLAGS or something | |
151 as close to them as possible. | |
152 | |
153 Users MUST be able to rebuild your source package without hand-editing on | |
154 any system with the same distribution installed. Remember to disable | |
155 (--disable-xxx) any optional features, because MPlayer's configure script | |
156 autodetects most of them. This ensures that binary package builds are | |
157 deterministic -- that is, provided they have at least the required | |
158 development packages installed, two different people using the same | |
159 distribution will get binaries with the same dependencies. | |
160 | |
161 You SHOULD provide an option to rebuild the package with full debug | |
162 information enabled (by passing --enable-debug=3 to ./configure and | |
163 disabling any stripping of binaries and libs during the build process). | |
14268 | 164 For example my source RPM can be rebuilt with a "--with debug" option, which |
14267 | 165 does just that, making it easier to supply gdb information along with any |
166 bug reports, while retaining all benefits of using binary packages. | |
167 | |
168 | |
169 Modifications | |
170 ~~~~~~~~~~~~~ | |
171 | |
172 You MUST modify `mplayer -v` output so that it is clear that a user is | |
173 using your binary package, by patching version.h and modifying the version | |
174 string inside. Suggested convention is to include distribution name and, | |
175 possibly, the signature of the packager or the repository. For example: | |
176 | |
177 original: | |
178 MPlayer 1.0pre5-3.3.2 (C) 2000-2004 MPlayer Team | |
179 modified: | |
180 MPlayer 1.0pre5-Fedora-GS-3.3.2 (C) 2000-2004 MPlayer Team | |
181 MPlayer 1.0pre5-Mandrake-PLF-3.2.3 (C) 2000-2004 MPlayer Team | |
182 MPlayer 1.0pre5-Solaris-3.4.0 (C) 2000-2004 MPlayer Team | |
183 | |
19783 | 184 If you patch MPlayer, send your patches to us! We will try to integrate them. |
185 Furthermore, we're often able to come up with a cleaner or more general | |
186 solution to your problem. | |
187 | |
19784 | 188 If you have modified configuration files or similar, please patch the official |
189 one instead of copying it into your package. This way you will automatically | |
190 pick up changes we make to it. | |
19783 | 191 |
19898
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
192 Do not override video and audio output selection in the system-wide config |
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
193 file. MPlayer will try to pick the best VO and AO itself and fall back |
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
194 gracefully. If you want to give priority to some AO, add a comma at the end |
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
195 of the line so that MPlayer can still fall back on others, for example: |
d77040154bad
Add (if applicable) footnote to binary codecs in the feature list.
rathann
parents:
19790
diff
changeset
|
196 ao=alsa, |
14267 | 197 |
198 Tips and tricks | |
199 ~~~~~~~~~~~~~~~ | |
200 In my package layout, mplayer and mplayer-gui can be installed at the same | |
201 time, because they contain differently named binaries and there is no | |
202 conflict. The trick is to build MPlayer once with --enable-gui, rename the | |
203 resulting binary to "gmplayer" and then build it again, without GUI, but | |
204 keeping the rest of ./configure options the same. | |
205 | |
206 To provide man pages for all MPlayer suite binaries (mplayer, gmplayer, | |
207 mencoder), you can use man-links instead of regular symbolic links. | |
208 Creating a mencoder man page linked to mplayer is as simple as: | |
209 | |
210 echo ".so mplayer.1" >> mencoder.1 | |
211 | |
14268 | 212 A similar trick can be used for "man gmplayer". This avoids problems with |
14267 | 213 gzipped man pages and symbolic links. |
214 | |
14268 | 215 Newer Red Hat and Fedora distributions keep localized man pages encoded in |
14267 | 216 UTF-8. If your distribution does the same, make sure you convert MPlayer's |
217 translated man pages to UTF-8 so that man mplayer works for locales other | |
218 than English. |