### this file is sourced not run
PKGVER=3.2.2
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=fpc-$PKGVER.x86_64-linux.tar
MD5SUM=0186779de0c9caee073fc1394afbee56
SRC_URL=http://downloads.sourceforge.net/freepascal/$TARBALL
BUNDLE=

INSTALL_PATH=/opt/fpc-$PKGVER

SLACKREQ=
SLACKDESC="fpc: fpc $PKGVER (Pascal compiler)
fpc: 
fpc: Free Pascal is a mature, versatile, open source Object Pascal 
fpc: compiler supporting both Delphi and Turbo Pascal 7.0 dialects, as 
fpc: well as Mac Pascal. It provides a completely portable RunTime Library 
fpc: (RTL) available on many platforms.
fpc: This is a re-packaged official binary. The compiler is installed in
fpc: $INSTALL_PATH.
fpc: 
fpc: https://www.freepascal.org/
fpc: https://sourceforge.net/projects/freepascal/
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/fpc* &&

	# install
	{
		echo $INSTALL_PATH
		echo ""
	} | sh install.sh &&

	# export our profile
	mkdir -p /etc/profile.d &&
	cat > /etc/profile.d/fpc.sh << EOF &&
export PATH=\$PATH:$INSTALL_PATH/bin
EOF
	chmod +x /etc/profile.d/fpc.sh &&
	
	pkg_build_slackdesc
}
