fix adding link to toolchain dir and remove & add copyright to package

This commit is contained in:
Егор 2024-11-11 07:47:00 +00:00
parent 376ae0fa91
commit e07c12dacc
6 changed files with 14 additions and 8 deletions

3
.gitignore vendored
View File

@ -1,4 +1,5 @@
Output/
package/DEBIAN/postinst
package/DEBIAN/copyright
package.deb
build/
build/

View File

@ -9,11 +9,13 @@ project(
add_custom_target(
Package
COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/install.sh ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postinst
COMMAND cp -f ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/copyright
COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN
COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/control
COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/prerm
COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postinst
COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/postrm
COMMAND chmod 775 ${CMAKE_CURRENT_SOURCE_DIR}/package/DEBIAN/copyright
COMMAND dpkg-deb --build ${CMAKE_CURRENT_SOURCE_DIR}/package ${CMAKE_CURRENT_BINARY_DIR}/package.deb
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)

View File

@ -43,6 +43,8 @@ if [[ ! -z "$INPUT" ]]; then
TOOLCHAIN_DIR=$INPUT
fi
echo "Installing toolchain to $TOOLCHAIN_DIR"
print_msg "Checking utilities..."
@ -136,7 +138,7 @@ print_ok "Successfully!"
if [ "$TOOLCHAIN_DIR" != "$DEFAULT_TOOLCHAIN_DIR" ]; then
sudo ln -sf $TOOLCHAIN_DIR $DEFAULT_TOOLCHAIN_DIR
sudo ln -sf $TOOLCHAIN_DIR/win32 $DEFAULT_TOOLCHAIN_DIR
fi
@ -146,7 +148,6 @@ EXPORT_MESSSAGE="export $MESSAGE"
if [ ! "$(id -u)" -ne 0 ]
then
echo $MESSAGE >> /etc/profile
sudo mkdir -p /etc/kos32-gcc
@ -154,7 +155,7 @@ then
else
if ! grep -q $EXPORT_MESSSAGE ~/.bashrc; then
print_msg "Adding '$TOOLCHAIN_DIR/win32/bin' to '~/.bashrc'"
echo $EXPORT_MESSSAGE >> ~/.bashrc
echo '$EXPORT_MESSSAGE' >> ~/.bashrc
fi
fi

View File

@ -11,4 +11,4 @@ Origin: http://ftp.kolibrios.org/users/Serge/new/Toolchain
Maintainer: Egor00f <velikiydolbayeb@gmail.com>
Installed-Size: 131708
Description: KolibriOS gcc toolchain installer
This package installing KolibriOS gcc toolchain.
This package installing KolibriOS gcc toolchain by Serge.

View File

@ -2,10 +2,10 @@
TOOLCHAIN_DIR=$(head -n 1 /etc/kos32-gcc/install-path)
MESSAGE="PATH=\$PATH:$TOOLCHAIN_DIR"
MESSAGE="PATH=\$PATH:$TOOLCHAIN_DIR\win32\bin"
if grep -q $MESSAGE /etc/profile; then
sed -i '/$MESSAGE/d' /etc/profile
if grep -q '$MESSAGE' /etc/profile; then
sudo sed -i '/$MESSAGE/d' /etc/profile
fi
rm /etc/kos32-gcc -R

View File

@ -3,3 +3,5 @@
TOOLCHAIN_DIR=$(head -n 1 /etc/kos32-gcc/install-path)
rm -R $TOOLCHAIN_DIR
rm -R /home/autobuild