diff --git a/generic/additional-files/projectx.rdef.in b/generic/additional-files/projectx.rdef.in new file mode 100644 index 00000000..c2ee6c52 --- /dev/null +++ b/generic/additional-files/projectx.rdef.in @@ -0,0 +1,26 @@ + +resource app_flags B_SINGLE_LAUNCH | B_ARGV_ONLY; + +resource app_version { + major = @MAJOR@, + middle = @MIDDLE@, + minor = @MINOR@, + + variety = B_APPV_FINAL, + internal = 0, + + short_info = "Project X", + long_info = "@LONG_INFO@" +}; + +resource app_signature "@APP_SIGNATURE@"; + +resource file_types message { + "types" = "application/x-asf", + "types" = "audio" +}; + +resource vector_icon { + $"6E636966020300AAFF05010102044030C34530BC3A30304030BC3A30C3454050" + $"BC3A50C34550504050C34550BC3A020A0101001001158400040A00010000" +}; diff --git a/generic/generic_cmd-1.2.3.recipe b/generic/generic_cmd-1.2.3.recipe index 4220c4a2..4185b523 100644 --- a/generic/generic_cmd-1.2.3.recipe +++ b/generic/generic_cmd-1.2.3.recipe @@ -17,7 +17,7 @@ SOURCE_DIR="$portVersionedName" PATCHES="projectx-$portVersion.patchset" ADDITIONAL_FILES="projectx.rdef" -ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" PROVIDES=" projectx = $portVersion @@ -35,15 +35,25 @@ BUILD_PREREQUIRES=" cmd:gcc " +GLOBAL_WRITABLE_FILES=" + settings/projectx.conf keep-old + " + +defineDebugInfoPackage projectx \ + "$commandBinDir"/projectx + BUILD() { + runConfigure ./configure make $jobArgs } INSTALL() { - mkdir -p $binDir - cp -a objects/projectx $binDir + make install + # or + install -d $binDir + install -t $binDir objects/projectx } TEST() diff --git a/generic/generic_cmd_secondary_arch-1.2.3.recipe b/generic/generic_cmd_secondary_arch-1.2.3.recipe new file mode 100644 index 00000000..d2e417cf --- /dev/null +++ b/generic/generic_cmd_secondary_arch-1.2.3.recipe @@ -0,0 +1,73 @@ +SUMMARY="Short description of ProjectX" +DESCRIPTION="Long ProjectX description. +Spanning several paragraphs, maybe + - containing + - bullet points etc. +You can also have really long lines that do not fit in 80 characters and use \ +a backslash to wrap the line." +HOMEPAGE="https://homepage/of/projectx.org" +COPYRIGHT="2014 Developer name + 2016 Another developer's name" +LICENSE="MIT + GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/HaikuArchives/ProjectX/archive/projectx-$portVersion.tar.gz" +CHECKSUM_SHA256="000000000000000000000000000000000" +SOURCE_DIR="$portVersionedName" +PATCHES="projectx-$portVersion.patchset" +ADDITIONAL_FILES="projectx.rdef" + +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86" + +# On x86_gcc2 we don't want to install the commands in bin//, but in bin/. +commandSuffix=$secondaryArchSuffix +commandBinDir=$binDir +if [ "$targetArchitecture" = x86_gcc2 ]; then + commandSuffix= + commandBinDir=$prefix/bin +fi + +PROVIDES=" + projectx = $portVersion + cmd:projectx$commandSuffix = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " +BUILD_PREREQUIRES=" + cmd:make + cmd:gcc + " + +GLOBAL_WRITABLE_FILES=" + settings/projectx.conf keep-old + " + +defineDebugInfoPackage projectx \ + "$commandBinDir"/projectx + +BUILD() +{ + runConfigure --omit-dirs "binDir sbinDir" ./configure \ + --bindir="$commandBinDir" \ + --sbindir="$commandBinDir" + make $jobArgs +} + +INSTALL() +{ + make install + # or + install -d $commandBinDir + install -t $commandBinDir objects/projectx +} + +TEST() +{ + make check +} diff --git a/generic/generic_font-1.2.3.recipe b/generic/generic_font-1.2.3.recipe index 0800b0b1..f58b27c5 100644 --- a/generic/generic_font-1.2.3.recipe +++ b/generic/generic_font-1.2.3.recipe @@ -19,21 +19,24 @@ DISABLE_SOURCE_PACKAGE=yes PROVIDES=" generic_font = $portVersion " -REQUIRES="" +REQUIRES=" + " -BUILD_REQUIRES="" -BUILD_PREREQUIRES="" +BUILD_REQUIRES=" + " +BUILD_PREREQUIRES=" + " BUILD() { - true + : # means nothing. } INSTALL() { FONTDIR=$fontsDir/ttfonts - mkdir -p ${FONTDIR} - cp generic-font1.ttf ${FONTDIR} - cp generic-font2.ttf ${FONTDIR} - cp generic-font-bold.ttf ${FONTDIR} + install -d ${FONTDIR} + install -t ${FONTDIR} generic-font1.ttf + install -t ${FONTDIR} generic-font2.ttf + install -t ${FONTDIR} generic-font-bold.ttf } diff --git a/generic/generic_haiku_app-1.2.3.recipe b/generic/generic_haiku_app-1.2.3.recipe index 4161d3f2..710ebcfc 100644 --- a/generic/generic_haiku_app-1.2.3.recipe +++ b/generic/generic_haiku_app-1.2.3.recipe @@ -17,7 +17,7 @@ SOURCE_DIR="$portVersionedName" PATCHES="projectx-$portVersion.patchset" ADDITIONAL_FILES="projectx.rdef" -ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" PROVIDES=" projectx = $portVersion @@ -36,6 +36,13 @@ BUILD_PREREQUIRES=" cmd:gcc " +defineDebugInfoPackage projectx \ + "$appsDir"/ProjectX + +GLOBAL_WRITABLE_FILES=" + settings/projectx.rc keep-old # If there is any + " + BUILD() { make $jobArgs OBJ_DIR=objects @@ -43,9 +50,34 @@ BUILD() INSTALL() { - mkdir -p $appsDir - cp -a objects/ProjectX $appsDir - addAppDeskbarSymlink $appsDir/ProjectX + install -d "$appsDir" + install -t "$appsDir" objects/ProjectX + + # Create the extra attributes + local APP_SIGNATURE="application/x-vnd.ProjectX" + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" +# local MINOR="`echo "$portVersion" | cut -d. -f3`" + local MINOR="0" + local LONG_INFO="$SUMMARY" + + # Add them to the rdef file + sed \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/projectx.rdef.in > projectx.rdef + + # Add the resources to the application + addResourcesToBinaries projectx.rdef "$appsDir"/ProjectX + + # Set the acceptable mimetypes + mimeset -f "$appsDir"/ProjectX + + # Create a Deskbar icon + addAppDeskbarSymlink "$appsDir"/ProjectX } TEST() diff --git a/generic/generic_haiku_app_secondary_arch-1.2.3.recipe b/generic/generic_haiku_app_secondary_arch-1.2.3.recipe new file mode 100644 index 00000000..52a642f6 --- /dev/null +++ b/generic/generic_haiku_app_secondary_arch-1.2.3.recipe @@ -0,0 +1,86 @@ +SUMMARY="Short description of ProjectX" +DESCRIPTION="Long ProjectX description. +Spanning several paragraphs, maybe + - containing + - bullet points etc. +You can also have really long lines that do not fit in 80 characters and use \ +a backslash to wrap the line." +HOMEPAGE="https://homepage/of/projectx.org" +COPYRIGHT="2014 Developer name + 2016 Another developer's name" +LICENSE="MIT + GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/HaikuArchives/ProjectX/archive/projectx-$portVersion.tar.gz" +CHECKSUM_SHA256="000000000000000000000000000000000" +SOURCE_DIR="$portVersionedName" +PATCHES="projectx-$portVersion.patchset" +ADDITIONAL_FILES="projectx.rdef" + +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" + +PROVIDES=" + projectx = $portVersion + app:projectx = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " +BUILD_PREREQUIRES=" + makefile_engine + cmd:make + cmd:gcc + " + +defineDebugInfoPackage projectx$secondaryArchSuffix \ + "$appsDir"/ProjectX + +GLOBAL_WRITABLE_FILES=" + settings/projectx.rc keep-old # If there is any + " + +BUILD() +{ + make $jobArgs OBJ_DIR=objects +} + +INSTALL() +{ + install -d "$appsDir" + install -t "$appsDir" objects/ProjectX + + # Create the extra attributes + local APP_SIGNATURE="application/x-vnd.ProjectX" + local MAJOR="`echo "$portVersion" | cut -d. -f1`" + local MIDDLE="`echo "$portVersion" | cut -d. -f2`" +# local MINOR="`echo "$portVersion" | cut -d. -f3`" + local MINOR="0" + local LONG_INFO="$SUMMARY" + + # Add them to the rdef file + sed \ + -e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \ + -e "s|@MAJOR@|$MAJOR|" \ + -e "s|@MIDDLE@|$MIDDLE|" \ + -e "s|@MINOR@|$MINOR|" \ + -e "s|@LONG_INFO@|$LONG_INFO|" \ + $portDir/additional-files/projectx.rdef.in > projectx.rdef + + # Add the resources to the application + addResourcesToBinaries projectx.rdef "$appsDir"/ProjectX + + # Set the acceptable mimetypes + mimeset -f "$appsDir"/ProjectX + + # Create a Deskbar icon + addAppDeskbarSymlink "$appsDir"/ProjectX +} + +TEST() +{ + make check +} diff --git a/generic/generic_lib-1.2.3.recipe b/generic/generic_lib-1.2.3.recipe index 210a2bf0..596daaf2 100644 --- a/generic/generic_lib-1.2.3.recipe +++ b/generic/generic_lib-1.2.3.recipe @@ -17,12 +17,15 @@ SOURCE_DIR="$portVersionedName" PATCHES="projectx-$portVersion.patchset" ADDITIONAL_FILES="projectx.rdef" -ARCHITECTURES="x86_gcc2 ?x86 ?x86_64" -SECONDARY_ARCHITECTURES="x86" +ARCHITECTURES="?x86_gcc2 ?x86 ?x86_64" +SECONDARY_ARCHITECTURES="?x86" + +libVersion="$portVersion" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" PROVIDES=" projectx$secondaryArchSuffix = $portVersion - lib:libprojectx$secondaryArchSuffix = $portVersion + lib:libprojectx$secondaryArchSuffix = $libVersionCompat " REQUIRES=" haiku$secondaryArchSuffix @@ -30,7 +33,7 @@ REQUIRES=" PROVIDES_devel=" projectx${secondaryArchSuffix}_devel = $portVersion - devel:libprojectx$secondaryArchSuffix = $portVersion + devel:libprojectx$secondaryArchSuffix = $libVersionCompat " REQUIRES_devel=" projectx$secondaryArchSuffix == $portVersion base @@ -40,28 +43,27 @@ BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel " BUILD_PREREQUIRES=" - makefile_engine cmd:make cmd:gcc$secondaryArchSuffix " +defineDebugInfoPackage projectx$secondaryArchSuffix \ + "$libDir"/libprojectx.so.$libVersion + BUILD() { - make $jobArgs OBJ_DIR=objects + runConfigure ./configure + make $jobArgs } INSTALL() { - mkdir -p $libDir - mkdir -p $includeDir - - cp -a objects/libprojectx.so $libDir - cp -R include/. $includeDir + make install prepareInstalledDevelLibs \ libprojectx packageEntries devel \ - $developDir + "$developDir" } TEST() diff --git a/generic/generic_python-1.2.3.recipe b/generic/generic_python-1.2.3.recipe new file mode 100644 index 00000000..5018ad6b --- /dev/null +++ b/generic/generic_python-1.2.3.recipe @@ -0,0 +1,68 @@ +SUMMARY="Short description of ProjectX" +DESCRIPTION="Long ProjectX description. +Spanning several paragraphs, maybe + - containing + - bullet points etc. +You can also have really long lines that do not fit in 80 characters and use \ +a backslash to wrap the line." +HOMEPAGE="https://homepage/of/projectx.org" +COPYRIGHT="2014 Developer name + 2016 Another developer's name" +LICENSE="MIT + GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/HaikuArchives/ProjectX/archive/projectx-$portVersion.tar.gz" +CHECKSUM_SHA256="000000000000000000000000000000000" +SOURCE_DIR="$portVersionedName" +PATCHES="projectx-$portVersion.patchset" +ADDITIONAL_FILES="projectx.rdef" + +ARCHITECTURES="any" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku + " + +BUILD_REQUIRES=" + haiku_devel + " + +PYTHON_PACKAGES=(python python3) +PYTHON_VERSIONS=(2.7 3.6) +for i in "${!PYTHON_PACKAGES[@]}"; do +pythonPackage=${PYTHON_PACKAGES[i]} +pythonVersion=${PYTHON_VERSIONS[$i]} +eval "PROVIDES_${pythonPackage}=\"\ + ${portName}_$pythonPackage = $portVersion\ + \"; \ +REQUIRES_$pythonPackage=\"\ + haiku\n\ + cmd:python$pythonVersion\ + \"" +BUILD_REQUIRES="$BUILD_REQUIRES + setuptools_$pythonPackage" +BUILD_PREREQUIRES="$BUILD_PREREQUIRES + cmd:python$pythonVersion" +done + +INSTALL() +{ + for i in "${!PYTHON_PACKAGES[@]}"; do + pythonPackage=${PYTHON_PACKAGES[i]} + pythonVersion=${PYTHON_VERSIONS[$i]} + + python=python$pythonVersion + installLocation=$prefix/lib/$python/vendor-packages/ + export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation + rm -rf build + $python setup.py build install \ + --root=/ --prefix=$prefix + + packageEntries $pythonPackage \ + $prefix/lib/python* + done +}