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

Scl utils 20120927 #53

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
701f12c
Create brp-scl-compress
andykimpe Feb 26, 2024
d7cd895
Delete doc/scl.1
andykimpe Feb 26, 2024
c4d0389
Delete rpm/brp-scl-compress
andykimpe Feb 26, 2024
d39e238
Delete rpm/brp-scl-python-bytecompile
andykimpe Feb 26, 2024
24630f3
Delete rpm/macros.scl
andykimpe Feb 26, 2024
23c500a
Delete rpm/scl.attr
andykimpe Feb 26, 2024
fe64296
Delete rpm/sclbuild.attr
andykimpe Feb 26, 2024
2ed0947
Delete rpm/scldeps.sh
andykimpe Feb 26, 2024
fb1612c
Delete shell/func_scl.csh
andykimpe Feb 26, 2024
67638ea
Delete shell/scl-completion.bash
andykimpe Feb 26, 2024
969289b
Delete shell/scl-init.csh
andykimpe Feb 26, 2024
68262a2
Delete shell/scl-init.sh
andykimpe Feb 26, 2024
ae93c3b
Delete shell/scl_enabled
andykimpe Feb 26, 2024
8ec6462
Delete shell/scl_source
andykimpe Feb 26, 2024
ddd9b85
Delete src directory
andykimpe Feb 26, 2024
ef887e0
Delete tests directory
andykimpe Feb 26, 2024
8471400
Delete .gitignore
andykimpe Feb 26, 2024
5fa3e6c
Delete CMakeLists.txt
andykimpe Feb 26, 2024
e98f6c9
Delete LICENSE
andykimpe Feb 26, 2024
7748736
Create brp-scl-python-bytecompile
andykimpe Feb 26, 2024
b5060f4
Create macros.scl
andykimpe Feb 26, 2024
982a1cb
Create Makefile
andykimpe Feb 26, 2024
8cf66bf
Create scl.1
andykimpe Feb 26, 2024
b754216
Create scl.attr
andykimpe Feb 26, 2024
3df79d3
Create scl.bash
andykimpe Feb 26, 2024
9b44e82
Create scl.c
andykimpe Feb 26, 2024
62507cc
Create scl_enabled
andykimpe Feb 26, 2024
14be7a2
full scl-utils-20120927.tar.gz
andykimpe Feb 26, 2024
e748fab
Update macros.scl
andykimpe Feb 28, 2024
0e83000
Update macros.scl
andykimpe Feb 28, 2024
e75ef20
Update macros.scl
andykimpe Feb 28, 2024
0cbac58
full scl-utils-20120927.tar.gz
andykimpe Feb 29, 2024
aafd483
Update macros.scl
andykimpe Mar 1, 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.

56 changes: 56 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
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
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 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
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
2 changes: 1 addition & 1 deletion rpm/brp-scl-compress → brp-scl-compress
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ -z "$RPM_BUILD_ROOT" -o "$RPM_BUILD_ROOT" = "/" ]; then
exit 0
fi

scl_path=${1:-opt/*}
scl_path=${1:-/opt/rh}

cd "$RPM_BUILD_ROOT"

Expand Down
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.

Loading