Re: Advise on Fedora RPM's

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Uttered "Paul W. Frields" <stickster@xxxxxxxxx>, spake thus:

> On Sun, 2005-11-20 at 11:21 -0600, Tommy Reynolds wrote:
> > Uttered Patrick Barnes <nman64@xxxxxxxxx>, spake thus:
> > > +1 on the package type.  Location would be /usr/src/redhat.  The full
> > > name might be something like 'fedora-doc-install-guide-devel.src.rpm'.
> > I'm thinking of these RPM's:
> > <foo>-<version>.src.rpm		Raw CVS dump, w/o CVS subdirs
> > <foo>-devel-<version>.noarch.rpm	Everything in CVS w/corrected paths
> > <foo>-<lang>-<version>.noarch.rpm	XML, XSL, images and desktop files
> > The .src RPM is for archiving purposes, I guess.
> Umm... Methinks this is kind of missing the point of the .src.rpm.
> Why triplicate this?

Ouch.  OK, I see the light.
 
> The only thing that should be needed for building is
> "fedora-doc-common-<ver>.noarch.rpm" which would contain user
> scripts and helpers equivalent to what's in CVS (probably just
> relocating, as mentioned above).

Recently I put the line "sinclude Make.paths" into "Makefile.common"
to deal with the relocations for RPM installation.  The idea is that
the docs-common package is a prerequisite to everything else.  As all
other packages get installed, a "%post" line does something like this:

%post
echo $(dirname $(rpm -ql docs-common | grep Makefile.common)) \
	>/path/to/example-tutorial/Make.paths

and then:

%pre
rm -f /path/to/example-tutorial/Make.paths

to close the loop.  I'll probably need to use a pkg-config crutch
because we'll still need to correct the paths embedded in the XML,
XSL and Makefiles.

> Is there a good reason *not* to do so (you know, other than "gee,
> that sounds hard")?

Not as long as you are doing the hard part ;-)

> > The -devel RPM is for folk wishing to use the FDP infrastructure but
> > not using the CVS facilities.  I'm not sure where the -devel files
> > should go, but maybe a "pkg-config" crutch would fix this.
> There's really no reason they couldn't live in /usr/share/fedora/
> somwhere, which is the right place for them given the namespacing the
> rest of the Fedora Project is using.

Fine with me.
 
> > The <lang> RPM would hold the XML infrastructure to allow desktop
> > tools like yelp to work.
> Right, which is why a separate -devel per doc is probably not that
> useful.  With a proper extra doc on "How to Build Docs," itself included
> in yelp/khelpcenter as part of the fedora-doc-[common|devel] package,
> people should be able to "fedoradoc-make" a doc, or something like that,
> to build things we've included, or their own docs.  Perhaps such a
> helper would also include relevant checks for project standards.

Yeah, that would work.  The docs-common package could drop stuff in a
"/usr/share/fedora/build" directory or the like.

> I realized that having a <lang> RPM implies we should have separate
> <lang> .desktop files for each package.  Just a note for the archive for
> later...

Er, no.  The .desktop files allow constructs like "Name[de]=Handheld
PDA" and "Name[es]=PDA de mano" and avoid all this cruft.  This
argues for either a real .desktop file that translators maintain or
the XML-style build info file I mentioned earlier.

==[/home/reynolds/src/f/fedora-docs/docs-common/rpm-info.dtd]==

<!--
  DTD for the Fedora Docs Project RPM Information file "rpm-info.xml"
-->

<!ELEMENT 	rpm-info 	(titles,changelog) 		>

<!ELEMENT 	titles	 	(translation+) 			>

<!ELEMENT	translation	(title,desc)*			>
<!ATTLIST	translation lang CDATA		#REQUIRED	>

<!ELEMENT	title		(#PCDATA)			>
<!ELEMENT	desc		(#PCDATA)			>

<!ELEMENT	changelog	(revision+)			>

<!ELEMENT	revision	(date,author,details)		>

<!ELEMENT	date		EMPTY				>
<!ATTLIST	date	year	CDATA		#REQUIRED	>
<!ATTLIST	date	month	CDATA		#REQUIRED	>
<!ATTLIST	date	day	CDATA		#REQUIRED	>
<!ATTLIST	date	dname	CDATA		#REQUIRED	>

<!ELEMENT	author		EMPTY				>
<!ATTLIST	author	name	CDATA		#REQUIRED	>
<!ATTLIST	author	email	CDATA		#REQUIRED	>

<!ELEMENT	details		(#PCDATA)			>

==[/home/reynolds/src/f/fedora-docs/docs-common/rpm-info.xml]==

<?xml version="1.0" encoding="UTF-8"?>

<!-- Sample document description from which we build RPMs -->

<!DOCTYPE rpm-info SYSTEM "rpm-info.dtd">
<rpm-info>
  <titles>
    <translation lang="en">
      <title>Example Tutorial</title>
      <desc>This is quite a feat.</desc>
    </translation>
    <translation lang="de">
      <title>Beispeil Tutorial</title>
      <desc>Ist idiotien</desc>
    </translation>
  </titles>
  <changelog>
    <revision>
      <date day="08" dname="Tue" month="11" year="2005"/>
      <author email="Tommy.Reynolds@xxxxxxxxxxxxx" name="Tommy Reynolds"/>
      <details>Just noodling with the files...</details>
    </revision>
  </changelog>
</rpm-info>

==[END]==

What 'cha think?

Attachment: pgpI7v8RscM7r.pgp
Description: PGP signature

-- 

fedora-docs-list@xxxxxxxxxx
To unsubscribe: 
https://www.redhat.com/mailman/listinfo/fedora-docs-list

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Red Hat 9]     [Yosemite News]     [KDE Users]

  Powered by Linux