Mailinglist Archive: opensuse-packaging (186 mails)

< Previous Next >
Re: [opensuse-packaging] openSUSE vs Fedora packaging documentation
  • From: Cristian Morales Vega <cmorve69@xxxxxxxx>
  • Date: Sun, 22 Feb 2009 08:55:26 +0100
  • Message-id: <8235e6f40902212355r12686aabkf72c7eec9a6dfa28@xxxxxxxxxxxxxx>
2009/2/12 Stanislav Brabec <sbrabec@xxxxxxx>:
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"
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


. "$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};;

echo "# norootforbuild

Name: "$NAME"
Version: "$VERSION"
Release: 0
License: "$LICENSE"
Group: "$GROUP"
Summary: "$SUMMARY"
Source: "$SOURCE"
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: "$DEPENDS"
BuildRequires: update-desktop-files optipng fdupes


%setup -q

%configure "$CONFIGURE_OPTS"
%{__make} %{?_smp_mflags}

%{__make} DESTDIR=%{buildroot} install
for FILE in \$(find %{buildroot} -name '*.desktop'); do
FILE=\$(basename "\$FILE")
%suse_update_desktop_file \${FILE%.desktop}
%optipng %{buildroot}
%fdupes -s %{buildroot}
rpm -ql filesystem > .filesystemlist
# Needed to get the correct final name of man pages
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

%{__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@xxxxxxxxxxxx
For additional commands, e-mail: opensuse-packaging+help@xxxxxxxxxxxx

< Previous Next >