1 |
* "Joe Peterson (lavajoe)" <lavajoe@g.o>: |
2 |
> 1.1 media-sound/squeezeboxserver/squeezeboxserver-7.4.1.ebuild |
3 |
> |
4 |
> file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezeboxserver/squeezeboxserver-7.4.1.ebuild?rev=1.1&view=markup |
5 |
> plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-sound/squeezeboxserver/squeezeboxserver-7.4.1.ebuild?rev=1.1&content-type=text/plain |
6 |
> |
7 |
> Index: squeezeboxserver-7.4.1.ebuild |
8 |
> =================================================================== |
9 |
|
10 |
> RDEPEND=" |
11 |
|
12 |
> >=dev-perl/Class-XSAccessor-1.03 |
13 |
> >=dev-perl/Class-XSAccessor-Array-1.04 |
14 |
|
15 |
Class-XSAccessor-Array was merge in dev-perl/Class-XSAccessor-1.05 (#275520) |
16 |
Please depend on ">=dev-perl/Class-XSAccessor-1.05" and drop -Array. |
17 |
|
18 |
> " |
19 |
|
20 |
> # Selected contents of SqueezeCenter's local CPAN collection that we include |
21 |
> # in the installation. This removes duplication of CPAN modules. (See Gentoo |
22 |
> # bug #251494). |
23 |
|
24 |
Hm, I've added a bunch of these modules as requested in |
25 |
https://bugs.gentoo.org/showdependencytree.cgi?id=251494 |
26 |
|
27 |
Why don't you use them now? |
28 |
|
29 |
> CPANKEEP=" |
30 |
> Class/XSAccessor/Array.pm |
31 |
> |
32 |
> JSON/XS/VersionOneAndTwo.pm |
33 |
> Class/Accessor/ |
34 |
> Class/Accessor.pm |
35 |
> MRO/Compat.pm |
36 |
> Algorithm/C3.pm |
37 |
> Data/ |
38 |
> DBIx/ |
39 |
> File/BOM.pm |
40 |
> Net/UPnP/ |
41 |
> Net/UPnP.pm |
42 |
> Proc/Background/ |
43 |
> Proc/Background.pm |
44 |
> Text/Unidecode/ |
45 |
> Text/Unidecode.pm |
46 |
> Tie/Cache/LRU/ |
47 |
> Tie/Cache/LRU.pm |
48 |
> Tie/LLHash.pm |
49 |
> Tie/RegexpHash.pm |
50 |
> UUID/Tiny.pm |
51 |
> URI/Find.pm |
52 |
> PAR/ |
53 |
> PAR.pm |
54 |
> enum.pm |
55 |
> " |
56 |
|
57 |
|
58 |
> LIBDIR="/usr/lib/squeezeboxserver" |
59 |
|
60 |
get_libdir ? |
61 |
|
62 |
> pkg_setup() { |
63 |
> # Sox has optional OGG and FLAC support, so make sure it has that included |
64 |
> # if required |
65 |
> if use ogg; then |
66 |
> if ! built_with_use media-sound/sox ogg; then |
67 |
> eerror "media-sound/sox not built with USE=ogg" |
68 |
> die "Squeezebox Server needs media-sound/sox to be built with USE=ogg" |
69 |
> fi |
70 |
> fi |
71 |
> if use flac; then |
72 |
> if ! built_with_use media-sound/sox flac; then |
73 |
> eerror "media-sound/sox not built with USE=flac" |
74 |
> die "Squeezebox Server needs media-sound/sox to be built with USE=flac" |
75 |
> fi |
76 |
> fi |
77 |
|
78 |
Use EAPI=2 and "USE Dependencies" |
79 |
<http://devmanual.gentoo.org/ebuild-writing/eapi/index.html> |
80 |
|
81 |
|
82 |
> src_install() { |
83 |
|
84 |
> # The main Perl executables |
85 |
> exeinto /usr/sbin |
86 |
> newexe slimserver.pl squeezeboxserver |
87 |
> newexe scanner.pl squeezeboxserver-scanner |
88 |
> newexe cleanup.pl squeezeboxserver-cleanup |
89 |
|
90 |
|| die |
91 |
|
92 |
> # Get the Perl package name and version |
93 |
> eval `perl '-V:package'` |
94 |
> eval `perl '-V:version'` |
95 |
> |
96 |
> # The custom OS module for Gentoo - provides OS-specific path details |
97 |
> cp "${FILESDIR}/gentoo-filepaths.pm" "Slim/Utils/OS/Custom.pm" || die "Unable to install Gentoo custom OS module" |
98 |
> |
99 |
> # The server Perl modules |
100 |
> dodir "/usr/lib/${package}/vendor_perl/${version}" |
101 |
> cp -r Slim "${D}/usr/lib/${package}/vendor_perl/${version}" || die "Unable to install server Perl modules" |
102 |
|
103 |
You can make use of: |
104 |
perl -V:installvendorlib |
105 |
|
106 |
> # Compiled CPAN module go under lib as they are arch-specific |
107 |
> dodir "/usr/lib/squeezeboxserver/CPAN" |
108 |
> cp -r CPAN/arch "${D}/usr/lib/squeezeboxserver/CPAN" || die "Unable to install compiled CPAN modules" |
109 |
> |
110 |
> # Preseve some of the Squeezebox Server-packaged CPAN modules that Gentoo |
111 |
> # doesn't provide ebuilds for. |
112 |
> for ITEM in ${CPANKEEP}; do |
113 |
> dodir "/usr/share/squeezeboxserver/CPAN/$(dirname ${ITEM})" |
114 |
> cp -r "CPAN/${ITEM}" "${D}/usr/share/squeezeboxserver/CPAN/${ITEM}" || die "Unable to preserve CPAN item ${ITEM}" |
115 |
> done |
116 |
|
117 |
For CPANKEEP, see above. |
118 |
|
119 |
> # Install preferences |
120 |
> insinto "${PREFSDIR}" |
121 |
> if [ ! -f "${PREFSDIR}/squeezeboxserver.prefs" ]; then |
122 |
|
123 |
This test in src_test is wrong. |
124 |
|
125 |
> newins "${FILESDIR}/squeezeboxserver.prefs" squeezeboxserver.prefs |
126 |
> fi |
127 |
> fowners squeezeboxserver:squeezeboxserver "${PREFSDIR}" |
128 |
> fperms 770 "${PREFSDIR}" |
129 |
|
130 |
|
131 |
> pkg_postinst() { |
132 |
|
133 |
> # Album art requires PNG and JPEG support from GD, so if it's not there |
134 |
> # then warn the user. It's not mandatory as the user may not be using |
135 |
> # album art. |
136 |
> if ! built_with_use dev-perl/GD jpeg || \ |
137 |
> ! built_with_use dev-perl/GD png || \ |
138 |
> ! built_with_use media-libs/gd jpeg || \ |
139 |
> ! built_with_use media-libs/gd png; then |
140 |
|
141 |
EAPI=2 and "if ! has_version dev-perl/GD[jpeg] || \ ..." is prefered. |
142 |
|
143 |
Regards |