Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
42 changes: 7 additions & 35 deletions Packaging/RedHat/0.build_libraries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,53 +8,25 @@ BUILD_RPM=1
. `dirname $0`/../functions.sh
. `dirname $0`/../environment.sh

prepare_redhat_environment
if [ $? -ne 0 ];then
print_ERR "Failed to setup building environment. Exiting..."
exit 1
fi
prepare_redhat_environment || error_exit "Failed to setup building environment. Exiting..."

# Apple Grand Central Dispatch
`dirname $0`/build_libdispatch.sh $1
if [ $? -ne 0 ]; then
echo "Aborting..."
exit 1
fi
`dirname $0`/build_libdispatch.sh "$@" || abort_with_message

# Apple Core Foundation
`dirname $0`/build_libcorefoundation.sh $1
if [ $? -ne 0 ]; then
echo "Aborting..."
exit 1
fi
`dirname $0`/build_libcorefoundation.sh "$@" || abort_with_message

# GNUstep Objective-C runtime
`dirname $0`/build_libobjc2.sh $1
if [ $? -ne 0 ]; then
echo "Aborting..."
exit 1
fi
`dirname $0`/build_libobjc2.sh "$@" || abort_with_message

# NextSpace Core
`dirname $0`/build_nextspace-core.sh $1
if [ $? -ne 0 ]; then
echo "Aborting..."
exit 1
fi
`dirname $0`/build_nextspace-core.sh "$@" || abort_with_message

# Raster graphics manipulation
`dirname $0`/build_libwraster.sh $1
if [ $? -ne 0 ]; then
echo "Aborting..."
exit 1
fi
`dirname $0`/build_libwraster.sh "$@" || abort_with_message

# GNUstep libraries
`dirname $0`/build_nextspace-gnustep.sh $1
if [ $? -ne 0 ]; then
echo "Aborting..."
exit 1
fi
`dirname $0`/build_nextspace-gnustep.sh "$@" || abort_with_message

print_OK " Build and install of NEXTSPACE Libraries SUCCEEDED!"

Expand Down
10 changes: 3 additions & 7 deletions Packaging/RedHat/1.build_frameworks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ BUILD_RPM=1
. `dirname $0`/../functions.sh
. `dirname $0`/../environment.sh

prepare_redhat_environment
if [ $? -ne 0 ];then
print_ERR "Failed to setup building environment. Exiting..."
exit 1
fi
prepare_redhat_environment || error_exit "Failed to setup building environment. Exiting..."

LOG_FILE=${CWD}/frameworks_build.log
SPEC_FILE=${PROJECT_DIR}/Packaging/RedHat/SPECS/nextspace-frameworks.spec
Expand All @@ -32,12 +28,12 @@ mv ${PROJECT_DIR}/nextspace-frameworks-${FRAMEWORKS_VERSION}.tar.gz ${RPM_SOURCE
spectool -g -R ${SPEC_FILE}

print_H2 "===== Building nextspace-frameworks package..."
rpmbuild -bb ${SPEC_FILE}
run_rpmbuild ${SPEC_FILE} "$@"
STATUS=$?
if [ $STATUS -eq 0 ]; then
print_OK " Building of NEXTSPACE Frameworks RPM SUCCEEDED!"
print_H2 "===== Installing nextspace-frameworks RPMs..."
FRAMEWORKS_VERSION=`rpm_version ${SPEC_FILE}`
FRAMEWORKS_VERSION=`rpm_version ${SPEC_FILE} "$@"`

install_rpm nextspace-frameworks ${RPMS_DIR}/nextspace-frameworks-${FRAMEWORKS_VERSION}.rpm
mv ${RPMS_DIR}/nextspace-frameworks-${FRAMEWORKS_VERSION}.rpm ${RELEASE_USR}
Expand Down
10 changes: 3 additions & 7 deletions Packaging/RedHat/2.build_applications.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ BUILD_RPM=1
. `dirname $0`/../functions.sh
. `dirname $0`/../environment.sh

prepare_redhat_environment
if [ $? -ne 0 ];then
print_ERR "Failed to setup building environment. Exiting..."
exit 1
fi
prepare_redhat_environment || error_exit "Failed to setup building environment. Exiting..."

LOG_FILE=/dev/null
SPEC_FILE=${PROJECT_DIR}/Packaging/RedHat/SPECS/nextspace-applications.spec
Expand All @@ -36,12 +32,12 @@ mv ${PROJECT_DIR}/nextspace-applications-${APPLICATIONS_VERSION}.tar.gz ${RPM_SO
spectool -g -R ${SPEC_FILE}

print_H2 "===== Building nextspace-applications package..."
rpmbuild -bb ${SPEC_FILE}
run_rpmbuild ${SPEC_FILE} "$@"
STATUS=$?
if [ $STATUS -eq 0 ]; then
print_OK " Building of NEXTSPACE Applications RPM SUCCEEDED!"
print_H2 "===== Installing nextspace-applications RPMs..."
APPLICATIONS_VERSION=`rpm_version ${SPEC_FILE}`
APPLICATIONS_VERSION=`rpm_version ${SPEC_FILE} "$@"`

install_rpm nextspace-applications ${RPMS_DIR}/nextspace-applications-${APPLICATIONS_VERSION}.rpm
mv ${RPMS_DIR}/nextspace-applications-${APPLICATIONS_VERSION}.rpm ${RELEASE_USR}
Expand Down
19 changes: 2 additions & 17 deletions Packaging/RedHat/3.build_selinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,10 @@ BUILD_RPM=1
. `dirname $0`/../functions.sh
. `dirname $0`/../environment.sh

if [ $# -eq 0 ];then
print_help
exit 1
fi

prepare_redhat_environment
if [ $? -ne 0 ];then
print_ERR "Failed to setup building environment. Exiting..."
exit 1
fi

REPO_DIR=$1
prepare_redhat_environment || error_exit "Failed to setup building environment. Exiting..."

# NextSpace SELinux
`dirname $0`/build_nextspace-selinux.sh $1
if [ $? -ne 0 ]; then
echo "Aborting..."
exit 1
fi
`dirname $0`/build_nextspace-selinux.sh "$@" || abort_with_message

print_OK " Build and install of NEXTSPACE SELinux SUCCEEDED!"

Expand Down
3 changes: 2 additions & 1 deletion Packaging/RedHat/SPECS/libcorefoundation.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
%global toolchain clang
%{!?release:%global release 1}
%define CFNET_VERSION 129.20

Name: libcorefoundation
Version: 5.9.2
Epoch: 0
Release: 1%{?dist}
Release: %{release}%{?dist}
Summary: Apple CoreFoundation framework.
License: Apache 2.0
URL: https://github.com/trunkmaster/apple-corefoundation
Expand Down
3 changes: 2 additions & 1 deletion Packaging/RedHat/SPECS/libdispatch.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
%global toolchain clang
%{!?release:%global release 1}

Name: libdispatch
Epoch: 1
Version: 5.9.2
Release: 1%{?dist}
Release: %{release}%{?dist}
Summary: Grand Central Dispatch (GCD or libdispatch).
License: Apache 2.0
URL: https://github.com/apple/swift-corelibs-libdispatch
Expand Down
3 changes: 2 additions & 1 deletion Packaging/RedHat/SPECS/libobjc2.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
%global toolchain clang
%{!?release:%global release 0}
%global _hardened_build 0

Name: libobjc2
Version: 2.2.1
Release: 0%{?dist}
Release: %{release}%{?dist}
Summary: GNUstep Objecttive-C runtime library.
License: GPL v2.0
URL: https://github.com/gnustep/libobjc2
Expand Down
3 changes: 2 additions & 1 deletion Packaging/RedHat/SPECS/libwraster.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
%global toolchain clang
%{!?release:%global release 0}
%define WRASTER_VERSION 7.0.1

Name: libwraster
Version: %{WRASTER_VERSION}
Release: 0%{?dist}
Release: %{release}%{?dist}
Summary: Raster graphics library.
Group: Libraries/NextSpace
License: GPLv3
Expand Down
3 changes: 2 additions & 1 deletion Packaging/RedHat/SPECS/nextspace-applications.spec
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
%global toolchain clang
%{!?release:%global release 0}

Name: nextspace-applications
Version: 0.95
Release: 0%{?dist}
Release: %{release}%{?dist}
Summary: NextSpace desktop core applications.

Group: Libraries/NextSpace
Expand Down
3 changes: 2 additions & 1 deletion Packaging/RedHat/SPECS/nextspace-core.spec
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
%global debug_package %{nil}
%{!?release:%global release 12}
%global _hardened_build 0

%define MAKE_VERSION 2_9_2

Name: nextspace-core
Version: 0.95
Release: 12%{?dist}
Release: %{release}%{?dist}
Summary: NextSpace filesystem hierarchy and system files.
License: GPLv2
URL: http://github.com/trunkmaster/nextspace
Expand Down
3 changes: 2 additions & 1 deletion Packaging/RedHat/SPECS/nextspace-frameworks.spec
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
%global toolchain clang
%{!?release:%global release 0}

Name: nextspace-frameworks
Version: 0.95
Release: 0%{?dist}
Release: %{release}%{?dist}
Summary: NextSpace core libraries.
Group: Libraries/NextSpace
License: GPLv2
Expand Down
3 changes: 2 additions & 1 deletion Packaging/RedHat/SPECS/nextspace-gnustep.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
%global toolchain clang
%{!?release:%global release 1}
%global _hardened_build 0

%define GS_REPO https://github.com/gnustep
Expand All @@ -12,7 +13,7 @@

Name: nextspace-gnustep
Version: %{BASE_VERSION}_%{GUI_VERSION}
Release: 1%{?dist}
Release: %{release}%{?dist}
Summary: GNUstep libraries.

Group: Libraries/NextSpace
Expand Down
3 changes: 2 additions & 1 deletion Packaging/RedHat/SPECS/nextspace-selinux.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
%global selinux_variants mls targeted
%global selinux_modules ns-core ns-gdomap ns-gpbs ns-gdnc ns-Login
%{!?release:%global release 0}

Name: nextspace-selinux
Version: 0.91
Release: 0%{?dist}
Release: %{release}%{?dist}
Summary: SELinux policies for NEXTSPACE components.

Group: Libraries/NextSpace
Expand Down
34 changes: 8 additions & 26 deletions Packaging/RedHat/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,18 @@ BUILD_RPM=1
. `dirname $0`/../functions.sh
. `dirname $0`/../environment.sh

if [ $# -eq 0 ];then
print_help
exit 1
fi
NEXTSPACE_DIR="$(cd "$(dirname "$0")/../.."; pwd)"

prepare_redhat_environment
if [ $? -ne 0 ];then
print_ERR "Failed to setup building environment. Exiting..."
exit 1
fi
test -d "${NEXTSPACE_DIR}" || errorExit "Invalid NEXTSPACE directory: '${NEXTSPACE_DIR}'."
prepare_redhat_environment || error_exit "Failed to setup building environment. Exiting..."

rm -rf ~/rpmbuild/SOURCES/*
rm -rf ~/rpmbuild/BUILD/*
rm -rf ~/rpmbuild/BUILDROOT/*
rm -rf $1/Packaging/RedHat/$OS_ID-$OS_VERSION/NSDeveloper/*
rm -rf $1/Packaging/RedHat/$OS_ID-$OS_VERSION/NSUser/*
rm -rf "${NEXTSPACE_DIR}/Packaging/RedHat/$OS_ID-$OS_VERSION/NSDeveloper"/*
rm -rf "${NEXTSPACE_DIR}/Packaging/RedHat/$OS_ID-$OS_VERSION/NSUser"/*

`dirname $0`/0.build_libraries.sh $1
if [ $? -ne 0 ]; then
echo "Aborting..."
exit 1
fi
`dirname $0`/1.build_frameworks.sh $1
if [ $? -ne 0 ]; then
echo "Aborting..."
exit 1
fi
`dirname $0`/2.build_applications.sh $1
if [ $? -ne 0 ]; then
echo "Aborting..."
exit 1
fi
`dirname $0`/0.build_libraries.sh "$@" || abort_with_message
`dirname $0`/1.build_frameworks.sh "$@" || abort_with_message
`dirname $0`/2.build_applications.sh "$@" || abort_with_message

4 changes: 2 additions & 2 deletions Packaging/RedHat/build_libcorefoundation.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BUILD_RPM=1
. `dirname $0`/../environment.sh

SPEC_FILE=${PROJECT_DIR}/Packaging/RedHat/SPECS/libcorefoundation.spec
CF_VERSION=`rpm_version ${SPEC_FILE}`
CF_VERSION=`rpm_version ${SPEC_FILE} "$@"`

print_H1 " Building Core Foundation (libcorefoundation) package..."
print_H2 "===== Install Core Foundation build dependencies..."
Expand All @@ -20,7 +20,7 @@ curl -L https://github.com/trunkmaster/apple-corefoundation/archive/refs/tags/${
spectool -g -R ${SPEC_FILE}

print_H2 "===== Building CoreFoundation package..."
rpmbuild -bb ${SPEC_FILE}
run_rpmbuild ${SPEC_FILE} "$@"
STATUS=$?
if [ $STATUS -eq 0 ]; then
print_OK " Building of Core Foundation library RPM SUCCEEDED!"
Expand Down
4 changes: 2 additions & 2 deletions Packaging/RedHat/build_libdispatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if [ "${OS_ID}" = "fedora" ]; then
fi

SPEC_FILE=${PROJECT_DIR}/Packaging/RedHat/SPECS/libdispatch.spec
DISPATCH_VERSION=`rpm_version ${SPEC_FILE}`
DISPATCH_VERSION=`rpm_version ${SPEC_FILE} "$@"`

# libdispatch
print_H1 " Building Grand Central Dispatch (libdispatch) package..."
Expand All @@ -26,7 +26,7 @@ curl -L https://github.com/apple/swift-corelibs-libdispatch/archive/swift-${VER}
spectool -g -R ${SPEC_FILE}

print_H2 "===== Building libdispatch package..."
rpmbuild -bb ${SPEC_FILE}
run_rpmbuild ${SPEC_FILE} "$@"
STATUS=$?
if [ $STATUS -eq 0 ]; then
print_OK " Building of Grand Central Dispatch library RPM SUCCEEDED!"
Expand Down
4 changes: 2 additions & 2 deletions Packaging/RedHat/build_libobjc2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ BUILD_RPM=1
. `dirname $0`/../environment.sh

SPEC_FILE=${PROJECT_DIR}/Packaging/RedHat/SPECS/libobjc2.spec
OBJC2_VERSION=`rpm_version ${SPEC_FILE}`
OBJC2_VERSION=`rpm_version ${SPEC_FILE} "$@"`

print_H1 " Building Objective-C Runtime(libobjc2) package..."
print_H2 "===== Install libobjc2 build dependencies..."
Expand All @@ -17,7 +17,7 @@ print_H2 "===== Downloading libobjc2 sources..."
spectool -g -R ${SPEC_FILE}

print_H2 "===== Building libobjc2 package..."
rpmbuild -bb ${SPEC_FILE}
run_rpmbuild ${SPEC_FILE} "$@"
STATUS=$?
if [ $STATUS -eq 0 ]; then
print_OK " Building of Objective-C Runtime RPM SUCCEEDED!"
Expand Down
4 changes: 2 additions & 2 deletions Packaging/RedHat/build_libwraster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ mv ${PROJECT_DIR}/Libraries/libwraster-${WRASTER_VERSION}.tar.gz ${RPM_SOURCES_D

spectool -g -R ${SPEC_FILE}
print_H2 "===== Building libwraster RPM..."
rpmbuild -bb ${SPEC_FILE}
run_rpmbuild ${SPEC_FILE} "$@"
STATUS=$?
if [ $STATUS -eq 0 ]; then
WRASTER_VERSION=`rpm_version ${SPEC_FILE}`
WRASTER_VERSION=`rpm_version ${SPEC_FILE} "$@"`
print_OK " Building libwraster RPM SUCCEEDED!"

install_rpm libwraster ${RPMS_DIR}/libwraster-${WRASTER_VERSION}.rpm
Expand Down
4 changes: 2 additions & 2 deletions Packaging/RedHat/build_nextspace-core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ rm ./nextspace-os_files-${CORE_VERSION}/GNUmakefile
tar zcf ${RPM_SOURCES_DIR}/nextspace-os_files-${CORE_VERSION}.tar.gz nextspace-os_files-${CORE_VERSION}
cd $CWD

CORE_VERSION=`rpm_version ${SPEC_FILE}`
CORE_VERSION=`rpm_version ${SPEC_FILE} "$@"`
cp ${PROJECT_DIR}/Libraries/gnustep/nextspace.fsl ${RPM_SOURCES_DIR}
spectool -g -R ${SPEC_FILE}

print_H2 "===== Building NEXTSPACE core components (nextspace-core) RPM..."
rpmbuild -bb ${SPEC_FILE}
run_rpmbuild ${SPEC_FILE} "$@"
STATUS=$?
if [ $STATUS -eq 0 ]; then
print_OK " Building of NEXTSPACE Core RPM SUCCEEDED!"
Expand Down
Loading