[moving to sourcejuicer-discuss] On Thu, 2009-03-26 at 11:58 +0000, Tomasz Kloczko wrote: > For example I want to start working on few packages for submit to SJ but > I can not start working on this because there is no package with > pkgbuild tool in /rel or even /dev IPS repositories.
I'm planning to add it to /contrib very soon, just wanted to release a new tarball that fixes some issues people reported recently. > Next thing: if I remember correctly pkgbuild is tool which should > provide very simillar way for build package to rpm based way. > I spend a lot of time on building rpm packages (few years .. in some > days I've build even tenths or something close to hundreds packages per > day). I see on SJ example page which suggest that pkgbuild environment > does not provide some basic macros environment. An example is just that. In fact the example was incorrect until a couple days ago, so don't jump to conclusions based on it. > On http://jucr.opensolaris.org/help/spec_file I see in point 4.2: > > %prep > rm -rf %name-%version > %setup -q -n nano-%version > > rpm based %setup macro performs "rm -rf %name-%version" by default and if > pkgbuild > provides the same base macros set this example is incorrect/misleading. pkgbuild does that too. The %setup macro should behave exactly like in rpmbuild. The rm -rf line in the example is unnecessary. > Next .. section 4.3: in this case instead: > > --- > %build > export CFLAGS="%optflags" > export LDFLAGS="%{_ldflags}" > ./configure --prefix=%{_prefix} \ > --bindir=%{_bindir} \ > --mandir=%{_mandir} \ > --infodir=%{_infodir} \ > --sysconfdir=%{_sysconfdir} \ > --enable-all > make > --- > > should be: > > --- > build > %configure \ > --enable-all The %configure macro is not defined, but it could be. Feel free to file a feature request on sourceforge. > %{__make} %__make is defined. For a list of macros that pkgbuild defines, see %_prefix/lib/pkgbuild-%version/macros > rpm %configure macro automatically adds using all above parameters (and few > more). > If pkgbuild does not provides %configure and %__make macros it should be > fixed. > > Using %{__make} instead plain "make" in case rpm allows make package build > more > or less parallel on build nviroment level without touching spec file by > add in ~/.rpmmacros line like: > > %__make make -j <mum> Actually, you can do that same with pkgbuild, by adding the same line to ~/.pkgbuildmacros Historically, we didn't use the %__make macro in the spec files produced by the desktop team, but there is nothing stopping you from using it. > Next point: example in 4.6: > > --- > %files > %defattr (-, root, bin) > %dir %attr (0755, root, bin) %{_bindir} > %{_bindir}/* > %{_infodir}/* > %dir %attr(0755, root, sys) %{_datadir} > %dir %attr(0755, root, bin) %{_mandir} > %dir %attr(0755, root, bin) %{_mandir}/* > %{_mandir}/*/* > > --- > > First: I know that traditional/"normal" Solaris package has listed > in files list all directories .. but IMO it is bad habit. I responded to this separately, but basically we need to define some system directories because we use the same spec file for building SVr4 and IPS packages. In SVr4 you are supposed to define all directories. While pkgbuild adds the missing ones automatically, it uses the %defattr attributes so some directories would be inconsistent with Solaris and cause installation errors. > - %post and %postun rpm scripts should be replaced by some actions scripts in > case OpenSiolaris. > Q: do we have any actions script for update/regenerate on install/uninstall > stage %{_infodir}/dir index file? I'm planning to add support for more actions but it's not done yet. > - what about language dependent files like gettext *.mo files in case > OpenSolaris? > (in above example files collected by "%find_lang %{name}" macro and > inserted in > %files list by "-f %{name}.lang" %files parameter). > Q1: do we have any special language dependent attributes on IPS level > package description level? In the desktop team, we usually put all l10n content in a "subpackage" called l10n. In the IPS manifest, this translates to the files being tagged with "l10n=yes". I know, they should be tagged with the appropriate locale. I will implement that when IPS is capable of installing selected locales (at least I don't think it is right now). > Q2: What about %doc attribute? files listed with the %doc attribute are copied to /usr/share/doc/<package name> and also tagged in IPS as docs. Laca _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
