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

Notices


Reply
  Search this Thread
Old 09-22-2012, 10:38 AM   #1
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
PKGBUILD for cvechecker-3.1


I made and tested this PKGBUILD file, to install cvechecker. Im not a programmer, and I don't have the time to create an account, read through their rules, over at Arch to upload it to the AUR. So, I am just going to leave this here. If anyone feels like checking it, uploading it, and taking the credit, feel free.

Code:
# Pkg by szboardstretcher 

pkgname=cvechecker-3.1
pkgver=3
pkgrel=1
pkgdesc="CVE checking utility"
arch=('i686' 'x86_64')
url="http://cvechecker.sourceforge.net/"
license=('GPL')
depends=('libconfig>=1.3' 'sqlite3' 'wget' 'libxslt')
#makedepends=('git')
provides=('cvechecker')
conflicts=('cvechecker')

_tar="http://downloads.sourceforge.net/project/cvechecker/cvechecker-3.1.tar.gz"

build() {
  msg "starting download...."
  wget $_tar > install.log 2>&1

  #git clone git://github.com/sjvermeu/cvechecker.git
  #cd cvechecker
  #git checkout $_commit
  
  msg "unpacking...."
  tar zxvf cvechecker-3.1.tar.gz >> install.log 2>&1
  cd cvechecker-3.1
  msg "starting make...."

  autoreconf --force --install >> ../install.log 2>&1

  ./configure --prefix=/usr --enable-sqlite3 >> ../install.log 2>&1
  make >> ../install.log 2>&1
  make install DESTDIR="${pkgdir}" >> ../install.log 2>&1

  cd "${pkgdir}"
  mv "usr/etc" .
}
 
Old 10-02-2012, 05:23 AM   #2
Lone_Wolf
Member
 
Registered: Jul 2007
Location: Netherlands
Distribution: Archlinux x86_64
Posts: 48

Rep: Reputation: 20
Next time you think about making a PKGBUILD, you might want to check the wiki first https://wiki.archlinux.org/index.php...ging_Standards
Especially the .proto pkgbuild examples in /usr/share/pacman are a great start.

makepkg/PKGBUILD have source downloading , checksumming & extracting for many file formats buildin.
In short :
you put source URLs in the source array
Their MD5 checksums go in the md5sums array . (there are other options like sha512 for checksums, but MD5 is the most common one)

Makepkg will download the files, verify the checksums and abort if they don't match.
If the checksums do match, the sources will be extracted to $srcdir.

No need to download/extract the source files yourself.

Last edited by Lone_Wolf; 10-02-2012 at 05:24 AM.
 
  


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
[SOLVED] How to see a PKGBUILD of a package? Mr. Alex Arch 3 01-07-2011 01:35 PM
Announcing Amigo-PkgBuild-0.3 gnashley Amigo 2 02-15-2009 04:13 PM
PkgBuild/src2pkg upgrade gnashley Slackware - Installation 1 10-20-2006 07:28 AM
A question for gnashley about PkgBuild Cpoc Slackware 3 10-12-2006 04:37 PM
PkgBuild-0.9 is released with new features. gnashley Slackware 6 06-26-2006 12:36 PM

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

All times are GMT -5. The time now is 07:31 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