Skip to content

Instantly share code, notes, and snippets.

@Phaeilo
Created November 15, 2014 21:00
Show Gist options
  • Save Phaeilo/2cd40c6a2cf6643adc9d to your computer and use it in GitHub Desktop.
Save Phaeilo/2cd40c6a2cf6643adc9d to your computer and use it in GitHub Desktop.
PKGBUILD for Lattice Diamond 3.3 Linux x86_64
pkgname=latticediamond
pkgver=3.3
pkgrel=1
pkgdesc="Leading edge design software for Lattice FPGA families."
arch=("x86_64")
url="http://www.latticesemi.com/Products/DesignSoftwareAndIP/FPGAandLDS/LatticeDiamond.aspx"
license=("custom")
depends=("glibc" "libjpeg-turbo" "libtiff" "glib2" "libusb" "freetype2" "fontconfig" "libx11" "libice" "libxt" "libxext" "libxrender" "libxi" "libxft")
options=("!strip" "docs" "libtool" "staticlibs" "emptydirs")
source=("diamond_3_3-base_x64-109-x86_64-linux.rpm")
md5sums=('9b4a7976a330063c6296936b870639a5')
package() {
cd "${srcdir}/usr/local/diamond/3.3_x64/docs"
tar -xzf docs.tar.gz
rm docs.tar.gz
cd "${srcdir}/usr/local/diamond/3.3_x64/cae_library"
tar -xzf cae_library.tar.gz
rm cae_library.tar.gz
cd "${srcdir}/usr/local/diamond/3.3_x64/synpbase"
tar -xzf synpbase.tar.gz
rm synpbase.tar.gz
cd "${srcdir}/usr/local/diamond/3.3_x64/tcltk"
tar -xzf tcltk.tar.gz
rm tcltk.tar.gz
cd "${srcdir}/usr/local/diamond/3.3_x64/ispfpga"
tar -xzf ispfpga.tar.gz
rm ispfpga.tar.gz
cd "${srcdir}/usr/local/diamond/3.3_x64/examples"
tar -xzf examples.tar.gz
rm examples.tar.gz
install -dm 755 "${pkgdir}/opt"
cp -dr --no-preserve=ownership "${srcdir}/usr/local/diamond/3.3_x64" "${pkgdir}/opt"
mv "${pkgdir}/opt/3.3_x64" "${pkgdir}/opt/diamond"
install -dm 755 "${pkgdir}/usr/bin"
ln -s "/opt/diamond/bin/lin64/diamond" "${pkgdir}/usr/bin/diamond"
install -dm 755 "${pkgdir}/usr/share/licenses/latticediamond"
ln -s "/opt/diamond/license/license.txt" "${pkgdir}/usr/share/licenses/latticediamond/LICENSE"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment