#! /bin/sh # Gmakepkg: A small script to aid in using makepkg. # Written by Daniel #Telling what the script does. zenity --question --title="Gmakepkg" --text="Gmakepkg is a script that aids in using the makepkg command. Do you want to continue?" if [ "$?" = 1 ];then exit 0 fi #Getting the location of the files. zenity --info --title="Location of files" --text="Please select the directory where the folders for your package are. (install etc.)" location=$(zenity --file-selection --directory --title="Location of files") if [ "$?" = 1 ];then exit 0 fi cd $location #Getting the name of the package. pkgname=$(zenity --entry --title="Name" --text="What is the name of your package?") if [ "$?" = 1 ];then exit 0 fi #Getting the version of the package. version=$(zenity --entry --title="Version" --text="What version is your package?") if [ "$?" = 1 ];then exit 0 fi #Getting the minimum architecture. minarch=$(zenity --entry --title="Minimum Architecture" --text="What is the minimum system architecture for your package? (Usually this should be i586.)") if [ "$?" = 1 ];then exit 0 fi #Getting build number. buildnum=$(zenity --entry --title="Build Number" --text="What is the build number of your package? (example: 1vl60)") if [ "$?" = 1 ];then exit 0 fi #Confirmation zenity --question --title="Confirmation" --text="Are these the correct settings? Name: $pkgname Version: $version Minimum Architecture: $minarch Build Number: $buildnum Click ok to make the package." if [ "$?" = 1 ];then exit 0 fi zenity --info --title="Starting" --text="Making the package... This might take a minute." #Making the package, outputing source .tar.gz, outputing slack-required and slack-desc. makepkg -l y -c n $pkgname-$version-$minarch-$buildnum.tlz tar -cvfz $pkgname-$version-$minarch-$buildnum.tar.gz $location cp $location/install/slack-required $location/slack-required cp $location/install/slack-desc $location/slack-desc #Finished zenity --info --title="Finished" --text="$pkgname has been packaged and is in $location. A source archive and the slack-required and slack-desc files have also been placed in $location."