LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 01-01-2011, 04:43 PM   #1
ahmadj
Member
 
Registered: Jun 2010
Distribution: Slackware64_13.37 \ Slackware_13.1 \ ARMedslack_13.37
Posts: 80

Rep: Reputation: 16
Making a SlackBuild script download from a repository instead of a tarball


Does anyone have a simple how-to on how to modify an existing slackbuild from slackbuilds.org to check source out of a git repo instead of downloading a tarball? Slackbuild in question is 'scantailor'.

I could just change the 'info' file to point to a git snapshot URL, but I would have trouble with the version numbers and tarball checksums needing manual updating, no?

Last edited by ahmadj; 01-01-2011 at 05:00 PM.
 
Old 01-01-2011, 05:42 PM   #2
brixtoncalling
Member
 
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403

Rep: Reputation: 67
If it is hosted on gitorious or github, you should be able to point to a particular revision of the code rather than the last commit. In this case, the checksums won't be an issue.
 
Old 01-01-2011, 06:05 PM   #3
ahmadj
Member
 
Registered: Jun 2010
Distribution: Slackware64_13.37 \ Slackware_13.1 \ ARMedslack_13.37
Posts: 80

Original Poster
Rep: Reputation: 16
Thanks. But I want to just be able to re-run the script to compile the latest commit.. is that possible?
 
Old 01-01-2011, 06:25 PM   #4
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.1
Posts: 1,225

Rep: Reputation: 187Reputation: 187
If I am understanding correctly you want to the buildscript to download the latest git snapshot and build from that? If so I would just edit the script like so


rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;


--------------------------

git

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
git clone git://scantailor.git.sourceforge.net/gitroot/scantailor/scantailor
cd $PRGNAM

chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;


Also don't forget to change your program version to the git snapshot version, for example if you did the build today you could call it r8452. Cause that is the version the git checkout gives you. Of course if you did the build this way you could not submit it to SBO, but it would work for personal use.

Last edited by Daedra; 01-01-2011 at 06:26 PM.
 
Old 01-01-2011, 06:27 PM   #5
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 2,658
Blog Entries: 3

Rep: Reputation: 224Reputation: 224Reputation: 224
Quote:
Hey ahmadj
look at this for some ideas. This down loads it configures it and builds it. also look at the gsb build scripts it down loads it builds it and installs it. Say thank you to alien bob

Last edited by Drakeo; 01-01-2011 at 08:02 PM.
 
Old 01-01-2011, 07:59 PM   #6
ahmadj
Member
 
Registered: Jun 2010
Distribution: Slackware64_13.37 \ Slackware_13.1 \ ARMedslack_13.37
Posts: 80

Original Poster
Rep: Reputation: 16
Thanks, Daedra, Drakeo and Eric. I will check those things out

EDIT: Pardon the pun!
 
Old 01-01-2011, 08:45 PM   #7
brixtoncalling
Member
 
Registered: Jul 2008
Location: British Columbia
Distribution: Slackware current
Posts: 403

Rep: Reputation: 67
I'm not sure what the policy of Slackbuilds.org is, but they might not accept taking an arbitrary source code point for the creation of a package. In this case, you would have to use a specific revision which is guaranteed to compile on Slackware (using the most recent snapshot won't give you such a guarantee).

Of course if the slackbuild is for yourself, there's no problem!
 
Old 01-02-2011, 07:48 AM   #8
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 2,658
Blog Entries: 3

Rep: Reputation: 224Reputation: 224Reputation: 224
Little off the subject have you read Slackware copy write oh my I love it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] I need help with a download tarball joseph2020 Linux - Software 6 03-10-2010 06:52 PM
Please help with tarball script mj12net_brian Linux - Server 3 12-07-2009 01:38 PM
Where can I download html2ps in tarball format? john lee Linux - Newbie 2 08-21-2007 11:13 PM
ok! loaded gentoo tarball. now need help with portage snapshot download randell6564 Linux - Software 2 11-24-2005 05:47 PM
can download tarball, but not RPM ylts Linux - Networking 11 04-15-2005 02:58 AM


All times are GMT -5. The time now is 07:37 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration