Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
51a5953
Create brp-scl-compress
andykimpe1 Feb 26, 2024
bd3c28d
Delete doc/scl.1
andykimpe1 Feb 26, 2024
707d536
Delete rpm/brp-scl-compress
andykimpe1 Feb 26, 2024
5cbbf4f
Delete rpm/brp-scl-python-bytecompile
andykimpe1 Feb 26, 2024
29f9b55
Delete rpm/macros.scl
andykimpe1 Feb 26, 2024
12b1ace
Delete rpm/scl.attr
andykimpe1 Feb 26, 2024
266b7e3
Delete rpm/sclbuild.attr
andykimpe1 Feb 26, 2024
0df4056
Delete rpm/scldeps.sh
andykimpe1 Feb 26, 2024
d1e4f67
Delete shell/func_scl.csh
andykimpe1 Feb 26, 2024
ae74feb
Delete shell/scl-completion.bash
andykimpe1 Feb 26, 2024
87f7f10
Delete shell/scl-init.csh
andykimpe1 Feb 26, 2024
ab6498d
Delete shell/scl-init.sh
andykimpe1 Feb 26, 2024
2cfff14
Delete shell/scl_enabled
andykimpe1 Feb 26, 2024
0673403
Delete shell/scl_source
andykimpe1 Feb 26, 2024
90260cb
Delete src directory
andykimpe1 Feb 26, 2024
aabeb4c
Delete tests directory
andykimpe1 Feb 26, 2024
07df5a9
Delete .gitignore
andykimpe1 Feb 26, 2024
109d929
Delete CMakeLists.txt
andykimpe1 Feb 26, 2024
efe7cdc
Delete LICENSE
andykimpe1 Feb 26, 2024
a89befc
Create brp-scl-python-bytecompile
andykimpe1 Feb 26, 2024
479df68
Create macros.scl
andykimpe1 Feb 26, 2024
b3cac77
Create Makefile
andykimpe1 Feb 26, 2024
22d5547
Create scl.1
andykimpe1 Feb 26, 2024
c8741fb
Create scl.attr
andykimpe1 Feb 26, 2024
40c74ad
Create scl.bash
andykimpe1 Feb 26, 2024
9b93ae9
Create scl.c
andykimpe1 Feb 26, 2024
63b3a07
Create scl_enabled
andykimpe1 Feb 26, 2024
81aace8
Create sclbuild
andykimpe1 Feb 26, 2024
ff854dd
full scl-utils-20130529.tar.gz
andykimpe1 Feb 26, 2024
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
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

59 changes: 0 additions & 59 deletions CMakeLists.txt

This file was deleted.

339 changes: 0 additions & 339 deletions LICENSE

This file was deleted.

57 changes: 57 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
NAME=scl-utils
VERSION=`date +%Y%m%d`
WARNINGS?=-Wall -Wshadow -Wcast-align -Winline -Wextra -Wmissing-noreturn
CFLAGS?=-O2
CFILES=scl.c
OTHERFILES=Makefile scl_enabled macros.scl scl.1 scldeps.sh scl.attr brp-scl-compress brp-scl-python-bytecompile scl.bash sclbuild
SOURCES=$(CFILES) $(OTHERFILES)

BINDIR?=/usr/bin
MANDIR?=/usr/share/man
RPMCONFDIR?=/usr/lib/rpm
CNFDIR?=/etc

all: scl

scl: $(SOURCES) $(OTHERFILES)
$(CC) $(CFLAGS) $(LDFLAGS) $(WARNINGS) $(CFILES) -o $@

clean:
rm -f *.o scl

distclean: clean
rm -f *~

dist: all
LANG=C
rm -rf $(NAME)-$(VERSION)
mkdir $(NAME)-$(VERSION)
cp $(SOURCES) $(NAME)-$(VERSION)
tar fcz $(NAME)-$(VERSION).tar.gz $(NAME)-$(VERSION)
rm -rf $(NAME)-$(VERSION)

install: all
mkdir -p $(DESTDIR)/$(BINDIR)
mkdir -p $(DESTDIR)/$(CNFDIR)/rpm
mkdir -p $(DESTDIR)/$(CNFDIR)/bash_completion.d
mkdir -p $(DESTDIR)/$(RPMCONFDIR)/fileattrs
cp macros.scl $(DESTDIR)/$(CNFDIR)/rpm
cp scl $(DESTDIR)/$(BINDIR)
cp sclbuild $(DESTDIR)/$(BINDIR)
cp scl_enabled $(DESTDIR)/$(BINDIR)
cp scl.1 $(DESTDIR)/$(MANDIR)/man1
cp scl.attr $(DESTDIR)/$(RPMCONFDIR)/fileattrs
cp scldeps.sh $(DESTDIR)/$(RPMCONFDIR)
cp brp-scl-compress $(DESTDIR)/$(RPMCONFDIR)
cp brp-scl-python-bytecompile $(DESTDIR)/$(RPMCONFDIR)
cp scl.bash $(DESTDIR)/$(CNFDIR)/bash_completion.d

uninstall:
rm -f $(BINDIR)/scl $(BINDIR)/scl_enabled $(BINDIR)/sclbuild
rm -f $(CNFDIR)/rpm/macros.scl
rm -f $(MANDIR)/man1/scl.1
rm -f $(RPMCONFDIR)/fileattrs/scl.attr
rm -f $(RPMCONFDIR)/scldeps.sh
rm -f $(RPMCONFDIR)/brp-scl-compress
rm -f $(RPMCONFDIR)/brp-scl-python-bytecompile
rm -f $(CNFDIR)/bash_completion.d/scl.bash
File renamed without changes.
8 changes: 4 additions & 4 deletions rpm/brp-scl-python-bytecompile → brp-scl-python-bytecompile
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ fi
[ "0$scl_path" = "0" ] && exit 0

# If we don't have a python interpreter, avoid changing anything.
default_python=${1:-/usr/bin/python3}
default_python=${1:-/usr/bin/python}
if [ ! -x "$default_python" ]; then
exit 0
fi
Expand All @@ -26,15 +26,15 @@ fi
# .pyc/.pyo files embed a "magic" value, identifying the ABI version of Python
# bytecode that they are for.
#
# The files below RPM_BUILD_ROOT could be targeting multiple versions of
# The files below RPM_BUILD_ROOT could be targetting multiple versions of
# python (e.g. a single build that emits several subpackages e.g. a
# python26-foo subpackage, a python31-foo subpackage etc)
#
# Support this by assuming that below each /usr/lib/python$VERSION/, all
# .pyc/.pyo files are to be compiled for /usr/bin/python$VERSION.
#
# For example, below /usr/lib/python2.6/, we're targeting /usr/bin/python2.6
# and below /usr/lib/python3.1/, we're targeting /usr/bin/python3.1
# For example, below /usr/lib/python2.6/, we're targetting /usr/bin/python2.6
# and below /usr/lib/python3.1/, we're targetting /usr/bin/python3.1

shopt -s nullglob
for python_libdir in "$RPM_BUILD_ROOT"/usr/lib{,64}/python[0-9].[0-9]/ "$RPM_BUILD_ROOT"/$scl_path/usr/lib{,64}/python[0-9].[0-9]/;
Expand Down
114 changes: 0 additions & 114 deletions doc/scl.1

This file was deleted.

89 changes: 27 additions & 62 deletions rpm/macros.scl → macros.scl
Original file line number Diff line number Diff line change
Expand Up @@ -3,49 +3,12 @@
# Copyright (C) 2012 Red Hat, Inc.
# Written by Jindrich Novy <jnovy@redhat.com>.

%scl_debug() %{expand:
%define old_debug %{lua:print(rpm.expand("%{debug_package}"):len())}
%undefine _debugsource_packages
%global debug_package %{expand:
%if "%{?old_debug}" == "0"
%{expand: %{nil}}
%else
%if "%{?scl}%{!?scl:0}" == "%{pkg_name}"
%{expand: %{nil}}
%else
%ifnarch noarch
%package debuginfo
Summary: Debug information for package %{name}
Group: Development/Debug
AutoReqProv: 0
Requires: %scl_runtime
Provides: scl-package(%scl)
%{lua:
debuginfo=tonumber(rpm.expand("%{old_debug}"))
if debuginfo > 0 then
rpm.define("__debug_package 1")
end
}
%description debuginfo
This package provides debug information for package %{name}.
Debug information is useful when developing applications that use this
package or when debugging this package.
%files debuginfo -f debugfiles.list
%defattr(-,root,root)
%endif
%endif
%endif
%{nil}}}

%scl_prefix() %{?scl:%(if [ "%1" = "%%1" ]; then echo "%{scl}-"; else echo "%1-"; fi)}%{!?scl:%{nil}}

%scl_package() %{expand:%{!?_root_prefix:
%global pkg_name %1
%global scl_name %{scl}
%global scl_prefix %{scl}-
%global scl_runtime %{scl}-runtime
%global scl_basedir /opt
%{!?scl_vendor: %global scl_vendor rh}
%{!?_scl_prefix: %global _scl_prefix %{scl_basedir}/%{scl_vendor}}
%{!?_scl_prefix: %global _scl_prefix /opt/rh}
%global _scl_scripts %{_scl_prefix}/%{scl}
%global _scl_root %{_scl_prefix}/%{scl}/root
%global _root_prefix %{_prefix}
Expand All @@ -55,7 +18,7 @@ package or when debugging this package.
%global _root_libexecdir %{_exec_prefix}/libexec
%global _root_datadir %{_prefix}/share
%global _root_sysconfdir %{_sysconfdir}
%global _root_sharedstatedir %{_sharedstatedir}
%global _root_sharedstatedir %{_prefix}/com
%global _root_localstatedir %{_localstatedir}
%global _root_libdir %{_exec_prefix}/%{_lib}
%global _root_includedir %{_prefix}/include
Expand All @@ -69,44 +32,46 @@ package or when debugging this package.
%global _libexecdir %{_exec_prefix}/libexec
%global _datadir %{_prefix}/share
%global _sysconfdir %{_scl_root}/etc
%{?nfsmountable: %global _sysconfdir %{_root_sysconfdir}%{_scl_prefix}/scls/%{scl}}
%global _sharedstatedir %{_scl_root}/var/lib
%{?nfsmountable: %global _sharedstatedir %{_root_localstatedir}%{_scl_prefix}/scls/%{scl}/lib}
%global _sharedstatedir %{_prefix}/com
%global _localstatedir %{_scl_root}/var
%{?nfsmountable: %global _localstatedir %{_root_localstatedir}%{_scl_prefix}/scls/%{scl}}
%global _libdir %{_exec_prefix}/%{_lib}
%global _includedir %{_prefix}/include
%global _infodir %{_datadir}/info
%global _mandir %{_datadir}/man
%global _docdir %{_datadir}/doc
%global _defaultdocdir %{_docdir}
}
%{?scl_dependency_generators:%scl_dependency_generators}
%global scl_pkg_name %{scl}-%{pkg_name}
%scl_debug
%global __os_install_post %{expand:
/usr/lib/rpm/brp-scl-compress %{_scl_root}
%{!?__debug_package:/usr/lib/rpm/brp-strip %{__strip}
/usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump}
%{!?__debug_package:/usr/lib/rpm/redhat/brp-strip %{__strip}
/usr/lib/rpm/redhat/brp-strip-comment-note %{__strip} %{__objdump}
}
/usr/lib/rpm/brp-strip-static-archive %{__strip}
/usr/lib/rpm/brp-scl-python-bytecompile %{__python3} %{?_python_bytecompile_errors_terminate_build} %{_scl_root}
[ -f /usr/lib/rpm/redhat/brp-python-hardlink ] && /usr/lib/rpm/redhat/brp-python-hardlink || /usr/lib/rpm/brp-python-hardlink
/usr/lib/rpm/redhat/brp-strip-static-archive %{__strip}
/usr/lib/rpm/brp-scl-python-bytecompile %{__python} %{?_python_bytecompile_errors_terminate_build} %{_scl_root}
/usr/lib/rpm/redhat/brp-python-hardlink
%{!?__jar_repack:/usr/lib/rpm/redhat/brp-java-repack-jars}
%{nil}}
BuildRequires: scl-utils-build
%if "%{?scl}%{!?scl:0}" == "%{pkg_name}"
Requires: %{scl_runtime}
Provides: scl-package(%{scl})
%global debug_package %{expand:
%ifnarch noarch
%global __debug_package 1
%package debuginfo
Summary: Debug information for package %{name}
Group: Development/Debug
AutoReqProv: 0
Provides: scl-package(%scl)
%description debuginfo
This package provides debug information for package %{name}.
Debug information is useful when developing applications that use this
package or when debugging this package.
%files debuginfo -f debugfiles.list
%defattr(-,root,root)
%endif
%{nil}}
BuildRequires: scl-utils-build
}
%{?scl_package_override:%scl_package_override}
}

%scl_require() %{_scl_prefix}/%1/enable, %1
%scl_require_package() %1-%2

%scl_enable_script() %{expand:
cat >> %{buildroot}%{_scl_scripts}/enable << 'EOF'
eval `/usr/bin/modulecmd bash load %{scl}`
EOF
}

3 changes: 0 additions & 3 deletions rpm/scl.attr

This file was deleted.

Loading