From a2ee592d591d8c0510bc2f75bb262885b7e952ca Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Fri, 28 Nov 2025 01:37:01 +0000 Subject: automatic import of cangjie-lts-compiler --- cangjie-lts-compiler.spec | 59 +++++++++++++++++++++++++++++++---------------- 1 file changed, 39 insertions(+), 20 deletions(-) diff --git a/cangjie-lts-compiler.spec b/cangjie-lts-compiler.spec index 6964732..5cc2222 100644 --- a/cangjie-lts-compiler.spec +++ b/cangjie-lts-compiler.spec @@ -4,7 +4,7 @@ Release: 1%{?dist} Summary: Cangjie program language compiler (LTS Channel) Packager: OpenCJ -License: Apache-V2 +License: APSL-2.0 URL: https://cangjie-lang.cn Source0: https://github.com/cangjielanguage/cangjie_compiler/archive/refs/tags/v%{version}.tar.gz @@ -76,6 +76,7 @@ for building Cangjie applications on Linux systems. The compiler supports native Linux compilation with LLVM backend and includes full debugging capabilities through cjdb/lldb integration. +%global debug_package %{nil} %prep %autosetup -n cangjie_compiler-%{version} @@ -103,44 +104,58 @@ python3 build.py build -t release --no-test --build-cjdb %install -# Run compiler installation +# Run compiler installation to output directory python3 build.py install -# Create installation directory +# Create installation directories mkdir -p %{buildroot}/opt/cangjie-lts +mkdir -p %{buildroot}%{_bindir} +mkdir -p %{buildroot}/etc/profile.d -# Copy all output files to installation directory cp -r output/* %{buildroot}/opt/cangjie-lts/ + # Create symlinks in /usr/bin for common commands -mkdir -p %{buildroot}%{_bindir} -ln -sf /opt/cangjie-lts/bin/cjc %{buildroot}%{_bindir}/cjc -ln -sf /opt/cangjie-lts/bin/cjdb %{buildroot}%{_bindir}/cjdb +ln -sf ../../opt/cangjie-lts/bin/cjc %{buildroot}%{_bindir}/cjc +ln -sf ../../opt/cangjie-lts/bin/cjdb %{buildroot}%{_bindir}/cjdb + # Create environment setup script in /etc/profile.d -mkdir -p %{buildroot}/etc/profile.d -cat > %{buildroot}/etc/profile.d/cangjie-lts.sh << 'EOF' -# Cangjie LTS environment setup -export CANGJIE_HOME=/opt/cangjie-lts -export PATH=$CANGJIE_HOME/bin:$PATH -export LD_LIBRARY_PATH=$CANGJIE_HOME/lib:$LD_LIBRARY_PATH -EOF +# cat > %{buildroot}/etc/profile.d/cangjie-lts.sh << 'EOF' +# # Cangjie LTS environment setup +# export CANGJIE_HOME=/opt/cangjie-lts +# export PATH=$CANGJIE_HOME/bin:$PATH +# export LD_LIBRARY_PATH=$CANGJIE_HOME/lib:$LD_LIBRARY_PATH +# EOF %files -# Main installation directory -/opt/cangjie-lts +# Main Cangjie installation directory +/opt/cangjie-lts/bin/ +/opt/cangjie-lts/lib/ +/opt/cangjie-lts/third_party/ +%dir /opt/cangjie-lts/modules/ # Symlinks in /usr/bin %{_bindir}/cjc %{_bindir}/cjdb # Environment setup script -/etc/profile.d/cangjie-lts.sh +# /etc/profile.d/cangjie-lts.sh + + +# Subpackage for compiler headers +%package -n cangjie-lts-compiler-include +Summary: Cangjie compiler development headers +Requires: cangjie-lts-compiler = %{version} -# License and documentation -%license LICENSE -%doc README.md +%description -n cangjie-lts-compiler-include +This package contains the development headers for the Cangjie compiler. +It is required for building Cangjie programs that integrate with the compiler. + +%files -n cangjie-lts-compiler-include +# Compiler headers +/opt/cangjie-lts/include/ %post @@ -164,6 +179,10 @@ fi %changelog +* Thu Nov 28 2025 yms +- Added cangjie-lts-compiler-include subpackage for development headers +- Moved include directory to separate package for modular installation + * Thu Nov 27 2025 yms - Initial RPM package for Cangjie LTS Compiler version 1.0.7 - Include cjc compiler and cjdb debugger -- cgit v1.2.3