1 |
I recently posted a question in the Portage & Programming forum and was told |
2 |
that this mailing list might be the place to go. Any help would be greatly |
3 |
appreciated. |
4 |
|
5 |
I have a custom in-house web based source code/packaging repository system |
6 |
that I need to integrate into ebuilds. It is kind of like a funky cvs |
7 |
system. Source code and packages are all viewed or downloaded via a |
8 |
browser. |
9 |
|
10 |
For example, to retrieve a gzipped tarball of a package named "mypackage" |
11 |
from the repository looks like: |
12 |
|
13 |
http://codeserver.wherever.net/pman/package_ids.php?action=package&id=10105 |
14 |
|
15 |
On any standard browser (konqueror, IE, firefox) this would retrieve a file |
16 |
named "mypackage.tar.gz". |
17 |
|
18 |
Here is where my problem starts, and why I believe a custom eclass might be |
19 |
my best route. |
20 |
|
21 |
The utility that fetches packages via emerge mangles the resulting file |
22 |
name, as well as wget (does emerge use wget?). When fetching the above url, |
23 |
emerge or wget saves the file as "package_ids.php?action=package&id=10105". |
24 |
This of course throws a wrench into my use of custom ebuilds :) |
25 |
|
26 |
Currently I route around the problem with a stupid hack in my ebuilds: |
27 |
|
28 |
##mypackage-20051006.ebuild |
29 |
#MY_P="mypackage.tar.gz" |
30 |
#DESCRIPTION="My example package" |
31 |
#HOMEPAGE="http://codeserver.wherever.net/pman/package_ids.php?action=package&id=1015" |
32 |
#SRC_URI="" |
33 |
#RESTRICT="fetch nostrip" |
34 |
#...snip... |
35 |
#src_install() { |
36 |
# wget "${HOMEPAGE}" -O ${WORKDIR}/${MY_P} || die "could not fetch |
37 |
#distfile" |
38 |
# cd ${WORKDIR} || die "cd ${WORKDIR}" |
39 |
# tar xfz ${MY_P} || die "Failed to extract ${MY_P}" |
40 |
# mv "${WORKDIR}/etc" "${D}/" || die "mv etc" |
41 |
# mv "${WORKDIR}/var" "${D}/" || die "mv /var" |
42 |
#} |
43 |
|
44 |
What I would like to do is create a custom elcass that allows me to replace |
45 |
the "standard" ebuild package fetching routines. It would need to: |
46 |
|
47 |
1) Check that the source tarball does not already exist. |
48 |
2) If the correct source tarball does not already exist, fetch it using |
49 |
something like wget -O source.tar.gz |
50 |
3) Rename source.tar.gz to ${DISTDIR}/${PN}-${PV}.tar.gz |
51 |
|
52 |
My problem is that I cannot seem to locate where any package fetching |
53 |
routines are in any of the existing eclasses to use as a template. Another |
54 |
thing I am curious about, will custom eclasses in PORTDIR_OVERLAY work |
55 |
correctly (assuming they are written correctly). |
56 |
|
57 |
If anyone could point me in the right direction I would certainly appreciate |
58 |
it. |