2009/2/12 Stanislav Brabec <sbrabec@suse.cz>:
Package building:
20 years ago there was no configure, no DESTDIR. Spec files like we use just now reflect this situation: Describe all needed steps manually in detail and just for a single package.
Now we have a different situation: 90% of packages use configure, support DESTDIR and installs files to standard directories.
We should think, how to reflect this situation. Package maintainers should spent their time on package understanding, improving and integrating, not in manual handling each file destination and cut-paste-edit work. Simple global change should not introduce editing of hundreds particular spec files.
Many people outside of the RPM world already went it this direction. Package description in a class based build system can consist from an absolute minimum of information needed for successful build of package.
Better building tools already exist: BitBake, ebuild, buildroot-ng, sorcery. Most of them are simpler to use than spec.
I can imagine, that a complete package build description in openSUSE 13.0 may consist from just 7 lines: ------------------ SUMMARY = "Graphic File Browser Utility" DESCRIPTION = ".........." GROUP = "Productivity/Graphics/Viewers" DEPENDS = "gtk2" HOMEPAGE = "http://gqview.sourceforge.net/" SRC_URI = "${SOURCEFORGE_MIRROR}/gqview/gqview-2.1.5.tar.gz" inherit autotools ------------------
If the problem is that spec files are too generic then you can create a wrapper from this, more specific, ".newspec" format to the more generic .spec format, true? The OBS could search for .newspec files if no .spec file is found and run something like #!/bin/sh . "$1.newspec" SOURCE=$(basename "$SRC_URI") wget "$SRC_URI" -O "$SOURCE" bznew "$SOURCE" case "$SOURCE" in *.gz) SOURCE=${SOURCE/%.gz/.bz2};; *.tgz) SOURCE=${SOURCE/%.tgz/.tar.bz2};; esac echo "# norootforbuild Name: "$NAME" Version: "$VERSION" Release: 0 License: "$LICENSE" Group: "$GROUP" Summary: "$SUMMARY" Source: "$SOURCE" URL: "$HOMEPAGE" BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: "$DEPENDS" BuildRequires: update-desktop-files optipng fdupes %description "$DESCRIPTION" %prep %setup -q %build %configure "$CONFIGURE_OPTS" %{__make} %{?_smp_mflags} %install %{__make} DESTDIR=%{buildroot} install for FILE in \$(find %{buildroot} -name '*.desktop'); do FILE=\$(basename "\$FILE") %suse_update_desktop_file \${FILE%.desktop} done %optipng %{buildroot} %fdupes -s %{buildroot} rpm -ql filesystem > .filesystemlist # Needed to get the correct final name of man pages /usr/lib/rpm/brp-compress find %{buildroot} | sed 's:%{buildroot}::' > .rpmlist %{__cat} .rpmlist .filesystemlist | sort | uniq -d > .duplist %{__cat} .rpmlist .duplist | sort | uniq -u > %{name}.files %{__rm} -f .filesystemlist .duplist .rpmlist %clean %{__rm} -rf %{buildroot} %files -f %{name}.files %defattr (-, root, root, 755) %changelog" > "$1.spec" But I also have my doubts about this working... -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org