Commit 3b9ac967 authored by Alexander Larsson's avatar Alexander Larsson
Browse files

Add common find_prov.sh and use in both sdk and platform base

parent 9f25342a
......@@ -39,33 +39,32 @@ SPECS =$(PACKAGES:%=packages/SPECS/%.spec)
deps: rpm-dependencies.P
rpm-dependencies.P: $(SPECS) makedeps.sh yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz
./setup.sh root-sdk var-sdk yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz
./build.sh root-sdk var-sdk packages ./makedeps.sh $(SPECS) > rpm-dependencies.P
./setup.sh root var yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz
./build.sh root var packages ./makedeps.sh $(SPECS) > rpm-dependencies.P
gnome-sdk-rpmdb.tar.xz gnome-sdk.tar.xz: packages/RPMS/noarch/gnome-sdk-0.1-1.noarch.rpm
./setup.sh root-sdk var-sdk yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz
./build.sh root-sdk var-sdk packages smart install -y packages/RPMS/noarch/gnome-sdk-0.1-1.noarch.rpm
./setup.sh root var yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz
./build.sh root var packages smart install -y packages/RPMS/noarch/gnome-sdk-0.1-1.noarch.rpm
rm -rf gnome-sdk.tar.xz
tar --transform 's,^root-sdk/usr/,,S' -cJvf gnome-sdk.tar.xz root-sdk/usr --owner=root
tar --transform 's,^var-sdk/,,S' -cJvf gnome-sdk-rpmdb.tar.xz var-sdk/lib/rpm --owner=root
tar --transform 's,^root/usr/,,S' -cJf gnome-sdk.tar.xz root/usr --owner=root
tar --transform 's,^var/,,S' -cJf gnome-sdk-rpmdb.tar.xz var/lib/rpm --owner=root
gnome-platform-base: packages/RPMS/x86_64/gnome-platform-base-0.1-1.x86_64.rpm
gnome-platform-base: packages/RPMS/noarch/gnome-platform-base-0.1-1.noarch.rpm
packages/RPMS/x86_64/gnome-platform-base-0.1-1.x86_64.rpm: packages/SPECS/gnome-platform-base.spec setup.sh build.sh yocto-build/x86_64/images/gnomeos-contents-platform-x86_64.tar.gz
packages/RPMS/noarch/gnome-platform-base-0.1-1.noarch.rpm: packages/SPECS/gnome-platform-base.spec setup.sh build.sh yocto-build/x86_64/images/gnomeos-contents-platform-x86_64.tar.gz yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz
echo building packages/SPECS/gnome-platform-base.spec
cp yocto-build/x86_64/images/gnomeos-contents-platform-x86_64.tar.gz packages/SOURCES/
./setup.sh root-sdk var-sdk yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz
./build.sh root-sdk var-sdk packages rpmbuild -ba packages/SPECS/gnome-platform-base.spec
rm -rf packages/gnome-platform
mkdir -p packages/gnome-platform
tar -C packages/gnome-platform -xzf yocto-build/x86_64/images/gnomeos-contents-platform-x86_64.tar.gz
./setup.sh root var yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz
./build.sh root var packages rpmbuild -ba packages/SPECS/gnome-platform-base.spec
gnome-sdk-base: packages/RPMS/x86_64/gnome-sdk-base-0.1-1.x86_64.rpm
gnome-sdk-base: packages/RPMS/noarch/gnome-sdk-base-0.1-1.noarch.rpm
gnome-platform.tar.xz: packages/RPMS/x86_64/gnome-platform-base-0.1-1.x86_64.rpm packages/RPMS/noarch/gnome-platform-0.1-1.noarch.rpm setup.sh build.sh
echo building gnome-platform
rm -rf packages/gnome-platform
mkdir -p packages/gnome-platform/var/lib/rpm
./setup.sh root-sdk var-sdk yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz
./build.sh root-sdk var-sdk packages ./install_rpms.sh gnome-platform
./build.sh packages/gnome-platform packages/gnome-platform/var packages /bin/sh /self/gnome-platform/post_install.sh
tar --transform 's,^packages/gnome-platform/usr/,,S' -cJvf gnome-platform.tar.xz packages/gnome-platform/usr --owner=root
./setup.sh root var yocto-build/x86_64/images/gnomeos-contents-platform-x86_64.tar.gz
./build.sh root var packages rpm -Uvh $PLATFORM_RPMS
tar --transform 's,^packages/gnome-platform/usr/,,S' -cJf gnome-platform.tar.xz packages/gnome-platform/usr --owner=root
-include rpm-dependencies.P
#!/bin/sh
USR=$1
export LC_ALL=C
for i in $USR/bin/*; do
j=`basename $i`
echo -n "/usr/bin/$j /bin/$j /sbin/$j "
done
echo $USR/lib/* | /usr/lib/rpm/find-provides | tr '\n' ' '
if [ -d $USR/lib/perl5 ]; then
find $USR/lib/perl5/ -type f | /usr/lib/rpm/perl.prov | tr '\n' ' '
fi
if [ -d $USR/lib/pkgconfig/ ]; then
find $USR/lib/pkgconfig/ -type f -or -type l | /usr/lib/rpm/pkgconfigdeps.sh -P | tr '\n' ' '
fi
......@@ -29,11 +29,11 @@ for spec in $SPECS; do
done
echo "$PACKAGES: $spec $BRS setup.sh build.sh yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz $SPEC_SOURCES"
echo " echo building $spec"
echo " ./setup.sh root-sdk var-sdk yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz"
echo " ./setup.sh root var yocto-build/x86_64/images/gnomeos-contents-sdk-x86_64.tar.gz"
if [ "x${BRS}" != "x" ]; then
echo " ./build.sh root-sdk var-sdk packages smart install -y $BRS"
echo " ./build.sh root var packages smart install -y $BRS"
fi
echo " ./build.sh root-sdk var-sdk packages rpmbuild -ba $spec"
echo " ./build.sh root var packages rpmbuild -ba $spec"
echo
echo "`basename ${spec} .spec`: $PACKAGES"
echo
......
......@@ -5,33 +5,23 @@ Summary: Base platform
License: Various
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Source: gnomeos-contents-platform-x86_64.tar.gz
BuildArch: noarch
# Yocto builds without the normal find-provides, we supply those provides in the gnome-platform-base package
Provides: %(./find_prov.sh /self/gnome-platform/usr)
%description
The base platform files
%prep
rm -rf gnome-platform-base
mkdir -p gnome-platform-base
%build
cd gnome-platform-base
tar -xf %{SOURCE0}
mv etc usr
%install
cd gnome-platform-base
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT
cp -ar usr $RPM_BUILD_ROOT/
%files
%defattr(-,root,root)
/*
%changelog
* Fri Nov 7 2014 Alexander Larsson <alexl@redhat.com>
......
......@@ -9,12 +9,7 @@ BuildArch: noarch
# Yocto builds without the normal find-provides, we supply those provides in the gnome-sdk-base package
Provides: %(echo /usr/bin/*)
Provides: %(echo /bin/*)
Provides: %(echo /sbin/*)
Provides: %(echo /usr/lib/* | /usr/lib/rpm/find-provides | tr '\n' ' ')
Provides: %(find /usr/lib/perl5/ -type f | /usr/lib/rpm/perl.prov | tr '\n' ' ')
Provides: %(find /usr/lib/pkgconfig/ -type f -or -type l | /usr/lib/rpm/pkgconfigdeps.sh -P | tr '\n' ' ')
Provides: %(./find_prov.sh /usr)
%description
The base sdk files
......@@ -30,8 +25,6 @@ The base sdk files
%files
%doc
%changelog
* Fri Nov 7 2014 Alexander Larsson <alexl@redhat.com>
- Initial version
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment