LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 06-16-2013, 12:03 PM   #16
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.0
Posts: 565
Blog Entries: 2

Rep: Reputation: 75

You could always use rpm2targz to convert the rpm package into a tarball. In fact, it is probably preferable since some work will almost inevitably be needed before you can make a working Slackware package out of it.
 
Old 06-16-2013, 02:38 PM   #17
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,856

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
Quote:
Originally Posted by psionl0 View Post
some work will almost inevitably be needed before you can make a working Slackware package out of it.
Bear in mind the OP already made a Slackware package and willysr is now maintaining a SlackBuild, so at this stage no more work is actually needed. The fact that I am dragging this thread out is more due to my pet peeve of people being overly afraid of using debs and rpms as sources (even when it makes sense, like here) because rpms/debs are only thought of as foreign packages, rather than archives (which they are as well).

Though even I will admit that in the grand scheme of things none of this really matters as much as someone (in this case willysr) making the effort to actually maintain something. So with that said, I think I'll probably just shut up now!
 
Old 06-16-2013, 06:17 PM   #18
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 2,569

Rep: Reputation: 426Reputation: 426Reputation: 426Reputation: 426Reputation: 426
@psionl0: yes, for some cases, rpm2tgz will just work fine. Even in the past, i used rpm2tgz to convert OpenOffice package from RPM to tgz and it still works, until later, Eric started to provide LO binary package and i switched to his package.

@ruario: It's not that i'm afraid of using RPM/DEB. I used DEB for some packages when there's no other option of using it, such as Google Chrome as they only provide DEB/RPM. But since nixnote (formely nevernote) already provide the tarballs, it makes more sense (and easier too) to use it

But, i'm open to any suggestion that will improve the SlackBuild
 
Old 06-17-2013, 03:18 AM   #19
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,856

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
Quote:
Originally Posted by ruario View Post
I think I'll probably just shut up now!
Why am I not strong enough to resist?

Quote:
Originally Posted by willysr View Post
it makes more sense
How do you figure that?

Here is something to consider. Suppose I told you that I had a gift for you and furthermore I would let you choose between two possible options. One of the gifts was wrapped with paper that you found pleasing to the eye, whilst the wrapping paper on the other was (to your eyes) less beautiful. However, here is the catch. Suppose you knew that the contents of the more ugly wrapped gift were in fact better. It contained everything from the more nicely wrapped gift plus further useful items.

Now I suspect most people faced with this dilemma would disregard the look of the wrapping paper and simply choose the best gift because they would appreciate that it is the contents that matter, not the paper wrapped around it, which is cast aside as soon as the gift is opened.

Tell me, which gift would you choose and why?

Quote:
Originally Posted by willysr View Post
(and easier too)
Nope it is the same: 'tar xf file.tar.gz' vs. 'bsdtar xf file.rpm'

Quote:
Originally Posted by willysr View Post
i'm open to any suggestion that will improve the SlackBuild
Cool, here is a suggestion, include a man page. You will find one in the deb or rpm.

Last edited by ruario; 06-18-2013 at 04:04 AM. Reason: Added the dilemma
 
Old 06-17-2013, 03:36 AM   #20
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 1,856

Rep: Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873Reputation: 873
Quote:
Originally Posted by willysr View Post
But, i'm open to any suggestion that will improve the SlackBuild
Here you go. It contains a man page and some interesting docs, plus it is 13 lines shorter and less complex than your version:

Code:
--- nixnote.SlackBuild.original
+++ nixnote.SlackBuild
@@ -24,7 +24,8 @@
 
 PRGNAM=nixnote
 VERSION=${VERSION:-1.6}
-BUILD=${BUILD:-2wsr}
+BUILD=${BUILD:-3}
+RPMBUILD=${RPMBUILD:-2}
 
 if [ -z "$ARCH" ]; then
   case "$( uname -m )" in
@@ -39,24 +40,12 @@
 PKG=$TMP/package-$PRGNAM
 OUTPUT=${OUTPUT:-/tmp}
 
-if [ "$ARCH" = "i486" ]; then  
-  SOURCEARCH="i386"
-elif [ "$ARCH" = "i686" ]; then
-  SOURCEARCH="i386"
-elif [ "$ARCH" = "x86_64" ]; then
-  SOURCEARCH="amd64"
-else
-  SOURCEARCH="i386"
-fi
-
 set -e
 
 rm -rf $PKG
 mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf $PRGNAM-$VERSION
-tar xvf $CWD/$PRGNAM-${VERSION}_$SOURCEARCH.tar.gz
-cd $PRGNAM
+cd $PKG
+bsdtar xf $CWD/$PRGNAM-$VERSION-$RPMBUILD.$(echo $ARCH | sed 's/i.86/i386/').rpm
 chown -R root:root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -64,15 +53,13 @@
  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
  -exec chmod 644 {} \;
 
-cp -r usr $PKG
-rm -rf $PKG/usr/share/man
-
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+mv $PKG/usr/share/{man,doc} $PKG/usr
+mv $PKG/usr/doc/$PRGNAM $PKG/usr/doc/${PRGNAM}-$VERSION
+rm $PKG/usr/doc/${PRGNAM}-$VERSION/changelog.Debian.gz
 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
 
 mkdir -p $PKG/install
 cat $CWD/slack-desc > $PKG/install/slack-desc
 cat $CWD/doinst.sh > $PKG/install/doinst.sh
 
-cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD${TAG:-wsr}.${PKGTYPE:-txz}

Last edited by ruario; 06-18-2013 at 02:05 PM. Reason: Re-wrote the whole patch to use rpm instead of deb because it results in shorter simplier SlackBuild
 
  


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
LXer: Everpad Integrates Evernote With Ubuntu Unity (AppIndicator, Lens) LXer Syndicated Linux News 0 09-18-2012 11:50 PM
LXer: Evernote for Android Gets a Major Update LXer Syndicated Linux News 0 05-05-2011 08:41 PM
LXer: Evernote For Linux: Nevernote LXer Syndicated Linux News 0 02-15-2011 04:40 PM


All times are GMT -5. The time now is 03:53 PM.

Main Menu
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