Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic recipes: rework #161

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions generic/additional-files/projectx.rdef.in
Original file line number Diff line number Diff line change
@@ -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 = "Audacious",
long_info = "@LONG_INFO@"
};

resource app_signature "@APP_SIGNATURE@";

resource file_types message {
"types" = "application/x-asf",
"types" = "audio"
};

resource vector_icon {
$"6E636966020300AAFF05010102044030C34530BC3A30304030BC3A30C3454050"
$"BC3A50C34550504050C34550BC3A020A0101001001158400040A00010000"
};
25 changes: 22 additions & 3 deletions generic/generic_cmd-1.2.3.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,19 @@ PATCHES="projectx-$portVersion.patchset"
ADDITIONAL_FILES="projectx.rdef"

ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86"
extrowerk marked this conversation as resolved.
Show resolved Hide resolved

# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandSuffix=$secondaryArchSuffix
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
commandSuffix=
commandBinDir=$prefix/bin
fi

PROVIDES="
projectx = $portVersion
extrowerk marked this conversation as resolved.
Show resolved Hide resolved
cmd:projectx = $portVersion
cmd:projectx$commandSuffix = $portVersion
"
REQUIRES="
haiku
Expand All @@ -35,15 +44,25 @@ BUILD_PREREQUIRES="
cmd:gcc
"

GLOBAL_WRITABLE_FILES="
settings/projectx.conf keep-old
"

defineDebugInfoPackage projectx \
extrowerk marked this conversation as resolved.
Show resolved Hide resolved
"$commandBinDir"/projectx

BUILD()
{
runConfigure --omit-dirs "binDir sbinDir" ./configure \
--bindir="$commandBinDir" \
--sbindir="$commandBinDir"
make $jobArgs
}

INSTALL()
{
mkdir -p $binDir
cp -a objects/projectx $binDir
mkdir -p $commandBinDir
cp -a objects/projectx $commandBinDir
extrowerk marked this conversation as resolved.
Show resolved Hide resolved
}

TEST()
Expand Down
14 changes: 10 additions & 4 deletions generic/generic_font-1.2.3.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,20 @@ DISABLE_SOURCE_PACKAGE=yes
PROVIDES="
generic_font = $portVersion
"
REQUIRES=""
REQUIRES="
:
extrowerk marked this conversation as resolved.
Show resolved Hide resolved
"

BUILD_REQUIRES=""
BUILD_PREREQUIRES=""
BUILD_REQUIRES="
:
"
BUILD_PREREQUIRES="
:
"

BUILD()
{
true
: # means nothing.
}

INSTALL()
Expand Down
38 changes: 35 additions & 3 deletions generic/generic_haiku_app-1.2.3.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,48 @@ BUILD_PREREQUIRES="
cmd:gcc
"

defineDebugInfoPackage projectx$secondaryArchSuffix \
"$appsDir"/ProjectX
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need to quote $appsDir?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better safe than sorry...


GLOBAL_WRITABLE_FILES="
settings/projectx.rc keep-old # If there is any
"
Comment on lines +42 to +44
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, needs to be declared before PROVIDES


BUILD()
{
make $jobArgs OBJ_DIR=objects
}

INSTALL()
{
mkdir -p $appsDir
cp -a objects/ProjectX $appsDir
addAppDeskbarSymlink $appsDir/ProjectX
mkdir -p "$appsDir"
cp -a objects/ProjectX "$appsDir"
Begasus marked this conversation as resolved.
Show resolved Hide resolved

# 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()
Expand Down
22 changes: 12 additions & 10 deletions generic/generic_lib-1.2.3.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,20 @@ ADDITIONAL_FILES="projectx.rdef"
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
"

PROVIDES_devel="
projectx${secondaryArchSuffix}_devel = $portVersion
devel:libprojectx$secondaryArchSuffix = $portVersion
devel:libprojectx$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
projectx$secondaryArchSuffix == $portVersion base
Expand All @@ -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()
Expand Down