--- /dev/null
+#
+WEBFETCH := wget
+SHA1SUM := sha1sum
+
+ALL += autoconf
+autoconf := autoconf-2.69.tar.gz
+autoconf-SHA1SUM := 328e7dd6c1074bf4cf5360c7a0b025da51c36062
+autoconf-URL1 := http://build.planet-lab.org/third-party/$(autoconf)
+autoconf-URL2 := http://mirror.onelab.eu/third-party/$(autoconf)
+
+all: $(ALL)
+.PHONY: all
+
+##############################
+define download_target
+$(1): $($(1))
+.PHONY: $(1)
+$($(1)):
+ @if [ ! -e "$($(1))" ] ; then \
+ { echo Using primary; echo "$(WEBFETCH) $($(1)-URL1)" ; $(WEBFETCH) $($(1)-URL1) ; } || \
+ { echo Using secondary; echo "$(WEBFETCH) $($(1)-URL2)" ; $(WEBFETCH) $($(1)-URL2) ; } ; fi
+ @if [ ! -e "$($(1))" ] ; then echo "Could not download source file: $($(1)) does not exist" ; exit 1 ; fi
+ @if test "$$$$($(SHA1SUM) $($(1)) | awk '{print $$$$1}')" != "$($(1)-SHA1SUM)" ; then \
+ echo "sha1sum of the downloaded $($(1)) does not match the one from 'Makefile'" ; \
+ echo "Local copy: $$$$($(SHA1SUM) $($(1)))" ; \
+ echo "In Makefile: $($(1)-SHA1SUM)" ; \
+ false ; \
+ else \
+ ls -l $($(1)) ; \
+ fi
+endef
+
+$(eval $(call download_target,autoconf))
+
+sources: $(ALL)
+.PHONY: sources
+
+####################
+# default - overridden by the build
+SPECFILE = autoconf.spec
+
+PWD=$(shell pwd)
+PREPARCH ?= noarch
+RPMDIRDEFS = --define "_sourcedir $(PWD)" --define "_builddir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)"
+trees: sources
+ rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bp --target $(PREPARCH) $(SPECFILE)
+
+srpm: sources
+ rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bs $(SPECFILE)
+
+TARGET ?= $(shell uname -m)
+rpm: sources
+ rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps --target $(TARGET) -bb $(SPECFILE)
+
+clean:
+ rm -f *.rpm *.tgz *.bz2 *.gz
+
+++%: varname=$(subst +,,$@)
+++%:
+ @echo "$(varname)=$($(varname))"
++%: varname=$(subst +,,$@)
++%:
+ @echo "$($(varname))"
--- /dev/null
+%define name autoconf
+%define version 2.69
+%define taglevel 1
+
+%global __debug_package 0
+
+%define release %{taglevel}
+
+Vendor: OneLab
+Packager: OneLab <support@planet-lab.eu>
+Distribution: PlanetLab %{plrelease}
+URL: %{SCMURL}
+
+Summary: autoconf rebuilt for sliver-openvswitch on f12
+Name: %{name}
+Version: %{version}
+Release: %{release}
+License: GPL
+Group: System Environment/Development
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+Source0: autoconf-%{version}.tar.gz
+
+%description
+autoconf automake
+
+%prep
+%setup -q
+
+%build
+./configure --prefix=/usr
+make
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+/usr
+
+%post
+
+%postun
+
+%changelog