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

Various packaging hints (was: Re: New package: icmpdn)



On Tue, 2005-06-28 at 20:55 +0200, Fredrik Tolf wrote:

> I did notice in the Wiki link that Ville Skytt sent that I could do
> something a filed called ~/.rpmmacros for that. I googled around a bit
> for it, but could find nothing about that particular bit. Does anyone
> have a link with info on this?

Not offhand, but attached is my ~/.rpmmacros which might be helpful.
The __arch_install_post stuff requires the fedora-rpmdevtools package
from Extras installed.

> > Note that on 64-bit multilib systems, the NSS modules are located
> > in /lib64, not /lib.
> 
> Does that mean that %{_lib} expands to only lib or lib64, and
> not /usr/lib or anything of the kind?

Yes.  See "rpm --eval %{_lib}".  Also, "rpm --showrc" shows much more
than you ever wanted to know :)

> Well, now that I know what the %changelog section is, I'll do that. Is
> there any particular formatting that you prefer the %changelog section
> to comply to? Right now, I wrote in the kind of formatting that Emacs'
> VC mode generates with C-x v a.

Use C-c C-e while in rpm-spec-mode.  I usually just hit enter to the
resulting "Change log entry:" prompt, and fill in the entries manually.

> If you don't mind me asking, though: Why is
> that rm -rf command there at all? Isn't that the kind of thing that
> rpmbuild ought to take care of itself?

No, sometimes you want to inspect the build root contents after the
build has completed.

> Well, I knew what ldconfig was for, but I didn't think that dlopen uses
> it. Would fix it, but I still don't know what this "PreReq" thingie is.
> Is it a tag in the same sense as Source0?

http://rpm.org/max-rpm-snapshot/s1-rpm-depend-manual-dependencies.html#S3-RPM-DEPEND-FINE-GRAINED

By the way, for %post and %postun scriptlets that only
invoke /sbin/ldconfig and nothing else (haven't looked if it's the case
in this package), use "%post -p /sbin/ldconfig" and the same for postun;
that way rpmbuild groks the dependencies automatically, no need for
PreReq or any other form of explicit dependency for ldconfig.

Oh, and there's quite a bit of info in the Wiki; when you have specific
questions, it might be good to try the (text) search at
http://fedoraproject.org/wiki/
%packager     Ville Skytt <ville.skytta at iki.fi>

%_topdir      %(echo ${HOME}/rpmbuild)
%buildroot    %{_tmppath}/%{name}-%{version}-%{release}-buildroot-%(id -u -n)

%_signature   gpg
%_gpg_name    %(echo "%{packager}" | sed 's/ at /@/ ; s/.*</</')

# This causes built RPMs to land in RPMS/ instead of RPMS/<arch>/
%_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

%_smp_mflags -j3

# For /etc/rpm/macros, just for reference here...
#%_install_langs         en:en_US:en_GB:fi:fi_FI

%__arch_install_post \
  /usr/lib/rpm/check-rpaths \
  /usr/lib/rpm/check-buildroot

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