I am new in building rpm package.For Creating RPM for my binary I have following dependancies:[tejas@target]$ ldd exe    linux-vdso.so.1 =>  (0x00007fff85bff000)    libQtWebKit.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtWebKit.so.4 (0x00007f868c4e8000)    libphonon.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libphonon.so.4 (0x00007f868c288000)    libQtScript.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtScript.so.4 (0x00007f868bdd3000)    libQt3Support.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQt3Support.so.4 (0x00007f868b8b5000)    libQtSql.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtSql.so.4 (0x00007f868b66f000)    libQtXml.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtXml.so.4 (0x00007f868b426000)    libQtGui.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtGui.so.4 (0x00007f868a6c7000)    libQtNetwork.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtNetwork.so.4 (0x00007f868a369000)    libQtCore.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtCore.so.4 (0x00007f8689e72000)    libpthread.so.0 => /lib64/libpthread.so.0 (0x0000003cd2200000)    libqwt.so.6 => /usr/lib64/libqwt.so.6 (0x00007f8689b4e000)    libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x0000003cd8200000)    libm.so.6 => /lib64/libm.so.6 (0x0000003cd1a00000)    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x0000003cd7e00000)    libc.so.6 => /lib64/libc.so.6 (0x0000003cd1600000)    libdl.so.2 => /lib64/libdl.so.2 (0x0000003cd1e00000)    libXrender.so.1 => /usr/lib64/libXrender.so.1 (0x000000373ba00000)    libgio-2.0.so.0 => /lib64/libgio-2.0.so.0 (0x00000030aa000000)    libgstapp-0.10.so.0 => /usr/lib64/libgstapp-0.10.so.0 (0x00000034f2e00000)    libgstinterfaces-0.10.so.0 => /usr/lib64/libgstinterfaces-0.10.so.0 (0x00000034f0e00000)    libgstpbutils-0.10.so.0 => /usr/lib64/libgstpbutils-0.10.so.0 (0x00000034f1a00000)    libgstvideo-0.10.so.0 => /usr/lib64/libgstvideo-0.10.so.0 (0x00000034f2200000)    libgstbase-0.10.so.0 => /usr/lib64/libgstbase-0.10.so.0 (0x00000034f1e00000)    libgstreamer-0.10.so.0 => /usr/lib64/libgstreamer-0.10.so.0 (0x00000034f1600000)    libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00000030b1200000)    libgmodule-2.0.so.0 => /lib64/libgmodule-2.0.so.0 (0x00000030a9800000)    libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x0000003cdba00000)    libgthread-2.0.so.0 => /lib64/libgthread-2.0.so.0 (0x00000030b4400000)    librt.so.1 => /lib64/librt.so.1 (0x0000003cd2a00000)    libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00000030b0e00000)    libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x0000003cd5e00000)    libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x0000003cd5a00000)    libXext.so.6 => /usr/lib64/libXext.so.6 (0x000000373b600000)    libX11.so.6 => /usr/lib64/libX11.so.6 (0x0000003e83600000)    libQtDBus.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtDBus.so.4 (0x00007f86898c1000)    libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x0000003cd5600000)    libz.so.1 => /lib64/libz.so.1 (0x0000003cd2600000)    libSM.so.6 => /usr/lib64/libSM.so.6 (0x000000373d200000)    libICE.so.6 => /usr/lib64/libICE.so.6 (0x0000003cdb200000)    /lib64/ld-linux-x86-64.so.2 (0x0000003cd1200000)    libQtSvg.so.4 => /opt/QtSDK/Desktop/Qt/4.8.0/gcc/lib/libQtSvg.so.4 (0x00007f8689662000)    libresolv.so.2 => /lib64/libresolv.so.2 (0x0000003cd3600000)    libselinux.so.1 => /lib64/libselinux.so.1 (0x0000003cd2e00000)    libexpat.so.1 => /lib64/libexpat.so.1 (0x0000003cd5200000)    libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x0000003e82600000)    libuuid.so.1 => /lib64/libuuid.so.1 (0x0000003e83200000)    libXau.so.6 => /usr/lib64/libXau.so.6 (0x0000003e81e00000)So I have checked from which rpm I can get those libraries by rpm -qf <library path> command.eg:[tejas@target]$ rpm -qf /lib64/libpthread.so.0glibc-2.12-1.80.el6_3.5.x86_64I have also checked which minimum version should be available for that library. So, accordingly I made spec file including all those packges.My .spec file is:[tejas@target]$ cat /home/tejas/rpmbuild/SPECS/ModCMS-gdm.specName:   ModCMS-gdm  Version:1.0 Release:1Summary:gdm     Group:  ModCMS  License:WESEE   URL:    http://wesee.org    Source0:ModCMS-gdm-1.0.tar.gz   Requires:dbus-libs >= 1.2.24Requires:expat >= 2.0.1Requires:fontconfig >= 2.8.0Requires:freetype >= 2.3.11Requires:glib2 >= 2.22.5Requires:glibc >= 2.12Requires:keyutils-libs >= 1.4Requires:krb5-libs >= 1.8.2Requires:libasyncns >= 0.8Requires:libcom_err >= 1.41.12Requires:libgcc >= 4.4.4Requires:libICE >= 1.0.6Requires:libpng >= 1.2.44Requires:libqwt6 = 6.0.1Requires:libselinux >= 2.0.94Requires:libSM >= 1.1.0Requires:libsndfile >= 1.0.20Requires:libstdc++ >= 4.4.4Requires:libuuid >= 2.17.2Requires:libXau >= 1.0.5Requires:libxcb >= 1.5Requires:libXcursor >= 1.1.10Requires:libXext >= 1.1Requires:libXfixes >= 4.0.4Requires:libXi >= 1.3Requires:libXinerama >= 1.1Requires:libXrandr >= 1.3.0Requires:libXrender >= 0.9.5Requires:libXtst >= 1.0.99.2Requires:openssl >= 1.0.1eRequires:pulseaudio-libs >= 0.9.21Requires:qt48 >= 4.8.5Requires:qt48-x11 >= 4.8.5Requires:qtwebkit >= 2.0Requires:sqlite >= 3.6.20Requires:tcp_wrappers-libs >= 7.6Requires:zlib >= 1.2.3%descriptionThis is Just to test various files allocation through rpm build%prep%setup -q%installmkdir -p $RPM_BUILD_ROOT/root/ModCMScp -r GDM.tar.gz $RPM_BUILD_ROOT/root/ModCMS/%files/root/ModCMS/GDM.tar.gz%cleanrm -rf $RPM_BUILD_ROOT%postcd /root/ModCMS/tar xzf GDM.tar.gzNow my questions are :   How do I mansion dependency libraries directly instead of rpm?Is it necessary to include all those dependencies in Required field?How do I minimize them?I have searched, but couldn't find specific solution.
How to decide what to mention in .spec file 'Requires: ' filed
rpm;dependencies;rpmbuild