Cristian Morales Vega wrote in Sun 02/22 2009 at 08:55 +0100:
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
All spec template systems have common problems: - There is no way to define exceptions: apply additional patch, move or remove installed file, change make behavior or similar. - There is no way to split package automatically. spec is a sub-optimal intermediate format for these meta formats: It's too sophisticated for simple tools and it's too dumb to be effective for mass changes. Just try your proposal below and try to compile package that_ - needs to export variable before configure - is not smp compatible - has a special desktop file that should not be translated - needs split to more sub-packages
#!/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... -- Best Regards / S pozdravem,
Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: sbrabec@suse.cz Lihovarská 1060/12 tel: +420 284 028 966, +49 911 740538747 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-packaging+help@opensuse.org