LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 12-27-2009, 04:39 AM   #16
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,657

Original Poster
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
Cool What tool do I use to extract the spec file?


Quote:
Originally Posted by DrLove73 View Post
Best practice to learn how to compile and create is to unpack packages with similar structure or same package from another distribution, unpack it and check it's spec file. That is how I started a year ago. Since then I recompiled about 30 package packs from Fedora to CentOS and created several mine own based on the source. use http://rpm.pbone.net to search for what you need. Look for a binary package you want and on it's page should be a link to src package.
So, just how do I extract the spec file from a .src package?

kdelibs4-4.3.85-6mdv2010.1.src.rpm

For the want of repackaging, not installing (only)

I'm reading rpm --help, rpmbuild --help next.

cheers, Glenn

Last edited by GlennsPref; 12-27-2009 at 05:39 PM. Reason: spelling and grammar
 
Old 12-27-2009, 06:12 AM   #17
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,657

Original Poster
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
OK, next step, I'm stuck again.

/home/glenn/rpmbuild/SPECS/kdelibs4.spec
Code:
Name:kdelibs
Version:4.3.4
Release:        1%{?dist}
Summary:KDE 4 system core files.

Group:Graphical desktop/KDE
License:GPL
URL:ftp://ftp.yz.yamagata-u.ac.jp/pub/X11/wm/kde/stable/4.3.4/src/kdelibs-4.3.4.tar.bz2
Source0:kdelibs-4.3.4.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:gcc,make
Requires:libpthread.so.0,libpthread.so.0,libkwalletbackend.so.4,rtld,libm.so.6,libkjs.so.4,perl-base,libgcc_s.so.1,libz.so.1,libc.so.6,libkhtml.so.5,libc.so.6,libpthread.so.0,libkdeinit4_kbuildsycoca4.so,libkdeui.so.5,libkdeinit4_kded4.so,libQtGui.so.4,libstdc++.so.6,rpmlib,libssl.so.0.9.8,rpmlib,libkutils.so.4,libkparts.so.4,libkdeinit4_kio_http_cache_cleaner.so,libQtXml.so.4,libsoprano.so.4,libHalf.so.6,libkdeinit4_klauncher.so,libenchant.so.1,libc.so.6,libc.so.6,libstdc++.so.6,libQtScript.so.4,bash,libgcc_s.so.1,libjasper.so.1,libphonon.so.4,libQtCore.so.4,libresolv.so.2,libstdc++.so.6,libc.so.6,libaspell.so.15,libc.so.6,shared-mime-info,libxslt.so.1,libgssapi_krb5.so.2,libkrosscore.so.4,libc.so.6,libkfile.so.4,libc.so.6,libktexteditor.so.4,libacl.so.1,libkio.so.5,rpmlib,libc.so.6,libm.so.6,libresolv.so.2,libxml2.so.2,libQtNetwork.so.4,libX11.so.6,rpmlib,libc.so.6,libkunittest.so.4,libresolv.so.2,libIlmImf.so.6,libkntlm.so.4,libkdecore.so.5,libgcc_s.so.1,libIex.so.6,libQtDesigner.so.4,libkjsembed.so.4,libkdeinit4_kconf_update.so,libQtDBus.so.4	


%description
KDE 4 system core files for KDE4.3.4.

%prep
%setup -q


%build
%configure
make %{?_smp_mflags}


%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
/usr/kdelibs4
%doc CHANGES
%doc INSTALL
%attr(755,root,root) /etc/rc.d/init.d/kdelibs4

%changelog
* Sat Nov 28 2009 GlennsPref
plasma
Bugfixes:

    * Fix pixmap caching bug. Improve overall plasma responsiveness. See SVN commit 1055788.

kio
Bugfixes:

    * Show the bookmark url in the statusbar when the mouse is over the menu item, like in kde3. Fixes bug 153960. See SVN commit 1048549.
    * Fix crash when killing a job while a rename or skip dialog for it is shown. Fixes bug 192976. See SVN commit 1055386.

kdebase [ all SVN changes ]
konqueror
Bugfixes:

    * Don't show (sometimes) the statusbar under the sidebar. Fixes bug 100373. See SVN commit 1047334.
    * Fix statusbar sometimes hidden by mistake in filemanagement mode. Fixes bug 193072. See SVN commit 1048275.

systemsettings
Bugfixes:

    * Don't offer to move the home directory when changing a path that was pointing to it. Fixes bug 193057. See SVN commit 1055428.

kdeutils [ all SVN changes ]
KGpg
Bugfixes:

    * Fix passphrases with non-ascii characters. Fixes bug 155790. See SVN commit 1045773.
    * Fix crash after deleting photo id. See SVN commit 1052147.

Okteta
Bugfixes:

    * Doing a edit in the value column did not trigger the modifiedChanged signal. Fixes bug 213868. See SVN commit 1046919.
    * On the close of modified documents the behaviour for the success of the save was inverted, wrongly closing unsaved documents and keeping saved open. Fixes bug 213868. See SVN commit 1046929.

kdeedu [ all SVN changes ]
Marble
Bugfixes:

    * Remove repeated debug output. Fixes bug 184033. See SVN commit 1049442.
    * Fix infinite loop caused by non-scalable fonts. Fixes bug 189633. See SVN commit 1049584.
    * Show the altitude in the current position (navigation mode). Fixes bug 202162. See SVN commit 1049668.
    * Do not search for the same term more than once in a row. Fixes duplicated result entries and crashes. Fixes bug 210013. See SVN commit 1049435.

kdegames [ all SVN changes ]
ktuberling
Bugfixes:

    * Improve saving of files. Fixes bug 214090. See SVN commit 1047741.

kdegraphics [ all SVN changes ]
Okular
Bugfixes:

    * Stop the search when pressing the [x] button in the find bar. See SVN commit 1045401.
    * Fix potential crash when searching. See SVN commit 1045411.
    * Fix crash on document close/reload. Fixes bug 212066. See SVN commit 1047675.
    * Fix saving of annotations using the current locale. Fixes bug 211990. See SVN commit 1050640.
    * Fix changing from single page to facing pages view changing the current viewport. Fixes bug 215463. See SVN commit 1052139.

kdemultimedia [ all SVN changes ]
JuK
Bugfixes:

    * Clear any filtering being used by the Now Playing bar if the Now Playing bar is hidden. Fixes bug 112238. See SVN commit 1054460.
    * Fix a question-mark icon when dragging tracks in a playlist. See SVN commit 1054467.

kdepim [ all SVN changes ]
KAlarm
Improvements:

    * In dual screen setup, show alarm in other screen if there is a full screen window (whether active or not). Fixes bug 211696. See SVN commits 1042513, 1043157 and 1049671.

Bugfixes:

    * Fix crashes when editing an alarm using the alarm window Edit button, if alarm window updates or closes. Fixes bug 213461. See SVN commits 1050233, 1050335, 1051193 and 1052909.

here is the output from the script....
I have had a few errors about the name and the change-log,
now I get this....
Code:
glenn@GamesBox:~/rpmbuild$ rpmbuild -ba SPECS/kdelibs4.spec                      (27-12 22:04)
sh: line 0: fg: no job control                                                                
Executing(%prep): /bin/sh -e /home/glenn/rpmbuild/tmp/rpm-tmp.D9EXo5                          
+ umask 022                                                                                   
+ cd /home/glenn/rpmbuild/BUILD                                                               
+ '[' 1 -eq 1 ']'                                                                             
+ '[' 1 -eq 1 ']'                                                                             
+ '[' 1 -eq 1 ']'                                                                             
+ cd /home/glenn/rpmbuild/BUILD                                                               
+ rm -rf kdelibs-4.3.4                                                                        
+ /bin/tar -xf -                                                                              
+ /usr/bin/bzip2 -dc /home/glenn/rpmbuild/SOURCES/kdelibs-4.3.4.tar.bz2                       
+ STATUS=0                                                                                    
+ '[' 0 -ne 0 ']'                                                                             
+ cd kdelibs-4.3.4                                                                            
+ exit 0                                                                                      
Executing(%build): /bin/sh -e /home/glenn/rpmbuild/tmp/rpm-tmp.5hO9zR                         
+ umask 022                                                                                   
+ cd /home/glenn/rpmbuild/BUILD                                                               
+ cd kdelibs-4.3.4                                                                            
+ '[' 1 -eq 1 ']'                                                                             
+ '[' 1 -eq 1 ']'                                                                             
+ CFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4'                                                                  
+ export CFLAGS                                                                                
+ CXXFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4'                                                                
+ export CXXFLAGS                                                                              
+ FFLAGS='-O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4'                                                                  
+ export FFLAGS                                                                                
+ LDFLAGS=' -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1'                           
+ export LDFLAGS                                                                               
+ CONFIGURE_TOP=.                                                                              
+ /usr/lib/rpm/manbo/force-as-needed-for-shared-lib-in-libtool                                 
Forcing -Wl,--as-needed in configure/libtool to workaround libtool bug (cf http://lists.gnu.org/archive/html/libtool-patches/2004-06/msg00002.html)                                           
+ /usr/lib/rpm/manbo/drop-ld-no-undefined-for-shared-lib-modules-in-libtool                    
+ /usr/lib/rpm/manbo/fix-libtool-ltmain-from-overlinking                                       
+ /usr/lib/rpm/manbo/fix-libtool-from-moving-options-after-libs .                              
+ /usr/lib/rpm/manbo/fix-dlsearch-path-in-libtool-for-multilib . lib64                         
+ cd .                                                                                         
+ '[' '!' -f configure.in -a '!' -f configure.ac ']'                                           
+ '[' -f ./configure.in -o -f ./configure.ac ']'                                               
+ ./configure x86_64-mandriva-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/lib64 --localstatedir=/var --sharedstatedir=/usr/com --mandir=/usr/share/man --infodir=/usr/share/info
getopt: unrecognized option '--program-prefix='
getopt: unrecognized option '--exec-prefix=/usr'
getopt: unrecognized option '--localstatedir=/var'
getopt: unrecognized option '--sharedstatedir=/usr/com'

KDE4 uses the CMake (http://www.cmake.org) buildsystem instead of configure.
CMake uses different options than configure, but some have direct equivalents:
   <srcdir>           : the source directory
   --prefix=<dir>     : -DCMAKE_INSTALL_PREFIX:PATH=<dir>
   --bindir=<dir>     : -DBIN_INSTALL_DIR:PATH=<dir>
   --includedir=<dir> : -DINCLUDE_INSTALL_DIR:PATH=<dir>
   --libdir=<dir>     : -DLIB_INSTALL_DIR:PATH=<dir>
Once CMake has run successfully, you can use "make edit_cache" to view and modify all settings.
For more information visit "http://techbase.kde.org/Development/Tutorials/CMake#Run_CMake"

Your current configure options translate more or less to:
   cmake -DCMAKE_INSTALL_PREFIX:PATH='/usr' -DBIN_INSTALL_DIR:PATH='/usr/bin' -DLIB_INSTALL_DIR:PATH='/usr/lib64' -DINCLUDE_INSTALL_DIR:PATH='/usr/include' . ; make ; make install

+ make -j2
make: *** No targets specified and no makefile found.  Stop.
error: Bad exit status from /home/glenn/rpmbuild/tmp/rpm-tmp.5hO9zR (%build)


RPM build errors:
    Bad exit status from /home/glenn/rpmbuild/tmp/rpm-tmp.5hO9zR (%build)
glenn@GamesBox:~/rpmbuild$
Yes, I still have quite a bit of understanding to absorb, and am beginning to appreciate the work of compilers.

The spec file is difficult to setup just by tagging lists to the file.

I am working off the example that has been offered by kbp, seems to be close to Mandriva.

I'm not sure how to interpret the error message.

Regards Glenn

Last edited by GlennsPref; 12-27-2009 at 06:21 AM.
 
Old 12-27-2009, 10:08 PM   #18
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
You'll need to replace the line '%configure... ' to use the appropriate cmake command as mentioned in the error.

If you extract the tarball to a temp dir you should be able to investigate the scripts and see what commands are actually used

You may need to replace the 'make ...' line as well, I haven't read up on cmake

Might be quicker to download a previous version srpm for kde-xxx and take a look at the spec file

cheers

Last edited by kbp; 12-27-2009 at 10:15 PM.
 
Old 12-28-2009, 06:52 PM   #19
GlennsPref
Senior Member
 
Registered: Apr 2004
Location: Brisbane, Australia
Distribution: Devuan
Posts: 3,657

Original Poster
Blog Entries: 33

Rep: Reputation: 283Reputation: 283Reputation: 283
This is a much larger subject that I first thought.

Trying to juggle between differing standards is difficult.

Maybe my small brain. lol

I'm going to attempt to build and install using checkinstall, on my system.

ref. http://wiki.mandriva.com/en/Mandriva_RPM_HOWTO
Quote:
Alternative: checkinstall

A very easy way to build RPMs for personal use is to install the checkinstall package; compile from source as usual (./configure && make && sudo make install), but just replace the make install step by checkinstall. This automates building an RPM, and is very simple to use. The advantage is that you don't ever have to bypass the package manager when compiling from source. (However, it's probably A Good Idea to build RPMs "properly" as described above, if you intend to distribute them to others.)
Thanks for your assistance, I'll be back!

cheers and regards Glenn

Last edited by GlennsPref; 12-29-2009 at 07:28 PM. Reason: spelling
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tar-command not found while compiling glibc-libidn-2.7.tar.bz2 of lfs6.3 aditya_gpch Linux From Scratch 1 05-13-2008 11:27 PM
Is the source in a distro-specific RPM the same as the sourcecode in a TAR.GZ or BZ2? GrapefruiTgirl Linux - Software 42 10-03-2007 08:30 PM
BackUp & Restore with TAR (.tar / .tar.gz / .tar.bz2 / tar.Z) asgarcymed Linux - General 5 12-31-2006 02:53 AM
How to? compile and install from source? (tar.*/gz2/bz2) entob Slackware 9 03-30-2004 06:23 PM
.rpms, .tar.gz, .tgz, .src.rpm, & .tar.bz2 whoots Mandriva 10 10-18-2003 12:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 10:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration