trigger scl-utils-build BR inclusion while using scl macros

and remove dsc macros and aliases
This commit is contained in:
Jindrich Novy 2012-01-25 14:25:36 +01:00
parent 59c337a7f8
commit 21970d8140
6 changed files with 81 additions and 148 deletions

3
.gitignore vendored
View File

@ -1,4 +1,3 @@
/dsc
/scl /scl
/scl.o /scl.o
/scl-utils-20120111.tar.gz /scl-utils-20120125.tar.gz

View File

@ -3,7 +3,7 @@ VERSION=`date +%Y%m%d`
WARNINGS?=-Wall -Wshadow -Wcast-align -Winline -Wextra -Wmissing-noreturn WARNINGS?=-Wall -Wshadow -Wcast-align -Winline -Wextra -Wmissing-noreturn
CFLAGS?=-O2 CFLAGS?=-O2
CFILES=scl.c CFILES=scl.c
OTHERFILES=Makefile scl_enabled macros.dsc OTHERFILES=Makefile scl_enabled macros.scl
SOURCES=$(CFILES) $(OTHERFILES) SOURCES=$(CFILES) $(OTHERFILES)
OBJECTS=scl.o OBJECTS=scl.o
@ -15,16 +15,14 @@ all: $(NAME)
$(NAME): $(SOURCES) $(OBJECTS) $(OTHERFILES) $(NAME): $(SOURCES) $(OBJECTS) $(OTHERFILES)
$(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(WARNINGS) -o scl $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECTS) $(WARNINGS) -o scl
rm -f dsc
ln -s scl dsc
clean: clean:
rm -f *.o scl dsc rm -f *.o scl
distclean: clean distclean: clean
rm -f *~ rm -f *~
dist: dist: $(NAME)
LANG=C LANG=C
rm -rf $(NAME)-$(VERSION) rm -rf $(NAME)-$(VERSION)
mkdir $(NAME)-$(VERSION) mkdir $(NAME)-$(VERSION)
@ -35,11 +33,11 @@ dist:
install: $(NAME) install: $(NAME)
mkdir -p $(DESTDIR)/$(BINDIR) mkdir -p $(DESTDIR)/$(BINDIR)
mkdir -p $(DESTDIR)/$(CNFDIR)/rpm mkdir -p $(DESTDIR)/$(CNFDIR)/rpm
cp macros.dsc $(DESTDIR)/$(CNFDIR)/rpm cp macros.scl $(DESTDIR)/$(CNFDIR)/rpm
cp scl $(DESTDIR)/$(BINDIR) cp scl $(DESTDIR)/$(BINDIR)
cp -d dsc $(DESTDIR)/$(BINDIR) cp -d scl $(DESTDIR)/$(BINDIR)
cp scl_enabled $(DESTDIR)/$(BINDIR) cp scl_enabled $(DESTDIR)/$(BINDIR)
uninstall: uninstall:
rm -f $(BINDIR)/$(NAME) $(BINDIR)/dsc rm -f $(BINDIR)/$(NAME) $(BINDIR)/scl
rm -f $(CNFDIR)/rpm/macros.dsc rm -f $(CNFDIR)/rpm/macros.scl

View File

@ -1,131 +0,0 @@
# Dynamic Software Collections RPM macros
#
# Copyright (C) 2012 Red Hat, Inc.
# Written by Jindrich Novy <jnovy@redhat.com>.
# "scl" prefixed macros are kept for compatibility please use "dsc"
# prefixed ones for production
%dsc_package() %{expand:%{!?_root_prefix:
%global pkg_name %1
%global dsc_short_prefix dsc
%global dsc_name %{dsc_short_prefix}_%{dsc}
%global dsc_runtime %{dsc_name}-runtime
%global dsc_prefix %{dsc_name}_
%{!?_dsc_prefix: %global _dsc_prefix /opt/rh}
%global _dsc_scripts %{_dsc_prefix}/%{dsc}
%global _dsc_root %{_dsc_prefix}/%{dsc}/root
%global _root_prefix %{_prefix}
%global _root_exec_prefix %{_root_prefix}
%global _root_bindir %{_exec_prefix}/bin
%global _root_sbindir %{_exec_prefix}/sbin
%global _root_libexecdir %{_exec_prefix}/libexec
%global _root_datadir %{_prefix}/share
%global _root_sysconfdir %{_sysconfdir}
%global _root_sharedstatedir %{_prefix}/com
%global _root_localstatedir %{_prefix}/var
%global _root_libdir %{_exec_prefix}/%{_lib}
%global _root_includedir %{_prefix}/include
%global _root_infodir %{_datadir}/info
%global _root_mandir %{_datadir}/man
%global _root_initddir %{_sysconfdir}/rc.d/init.d
%global _prefix %{_dsc_root}/usr
%global _exec_prefix %{_prefix}
%global _bindir %{_exec_prefix}/bin
%global _sbindir %{_exec_prefix}/sbin
%global _libexecdir %{_exec_prefix}/libexec
%global _datadir %{_prefix}/share
%global _sysconfdir %{_dsc_root}/etc
%global _sharedstatedir %{_prefix}/com
%global _localstatedir %{_prefix}/var
%global _libdir %{_exec_prefix}/%{_lib}
%global _includedir %{_prefix}/include
%global _infodir %{_datadir}/info
%global _mandir %{_datadir}/man
%global _docdir %{_datadir}/doc
%global _defaultdocdir %{_docdir}
%global dsc_pkg_name %{dsc_short_prefix}_%{dsc}_%{pkg_name}
}}
%dsc_require() %{_dsc_prefix}/%1/enable
%dsc_files %{expand:
%{_dsc_root}
%{_dsc_scripts}
%{_dsc_scripts}/enable
%{_root_sysconfdir}/scl/prefixes/%dsc
}
%dsc_install %{expand:
mkdir -p %{buildroot}%{_root_sysconfdir}/{rpm,scl/prefixes}
echo -n '%' > %{buildroot}%{_root_sysconfdir}/rpm/macros.%{dsc}-config
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{dsc}-config << EOF
scl %dsc
EOF
cat >> %{buildroot}%{_root_sysconfdir}/scl/prefixes/%{dsc} << EOF
%_dsc_prefix
EOF
}
# compatibility macros follow
%scl_package() %{expand:%{!?_root_prefix:
%global pkg_name %1
%global scl_short_prefix dsc
%global scl_name %{scl_short_prefix}_%{scl}
%global scl_runtime %{scl_name}-runtime
%global scl_prefix %{scl_name}_
%{!?_scl_prefix: %global _scl_prefix /opt/rh}
%global _scl_scripts %{_scl_prefix}/%{scl}
%global _scl_root %{_scl_prefix}/%{scl}/root
%global _root_prefix %{_prefix}
%global _root_exec_prefix %{_root_prefix}
%global _root_bindir %{_exec_prefix}/bin
%global _root_sbindir %{_exec_prefix}/sbin
%global _root_libexecdir %{_exec_prefix}/libexec
%global _root_datadir %{_prefix}/share
%global _root_sysconfdir %{_sysconfdir}
%global _root_sharedstatedir %{_prefix}/com
%global _root_localstatedir %{_prefix}/var
%global _root_libdir %{_exec_prefix}/%{_lib}
%global _root_includedir %{_prefix}/include
%global _root_infodir %{_datadir}/info
%global _root_mandir %{_datadir}/man
%global _root_initddir %{_sysconfdir}/rc.d/init.d
%global _prefix %{_scl_root}/usr
%global _exec_prefix %{_prefix}
%global _bindir %{_exec_prefix}/bin
%global _sbindir %{_exec_prefix}/sbin
%global _libexecdir %{_exec_prefix}/libexec
%global _datadir %{_prefix}/share
%global _sysconfdir %{_scl_root}/etc
%global _sharedstatedir %{_prefix}/com
%global _localstatedir %{_prefix}/var
%global _libdir %{_exec_prefix}/%{_lib}
%global _includedir %{_prefix}/include
%global _infodir %{_datadir}/info
%global _mandir %{_datadir}/man
%global _docdir %{_datadir}/doc
%global _defaultdocdir %{_docdir}
%global scl_pkg_name %{scl_short_prefix}_%{scl}_%{pkg_name}
}}
%scl_require() %{_scl_prefix}/%1/enable
%scl_files %{expand:
%{_scl_root}
%{_scl_scripts}
%{_scl_scripts}/enable
%{_root_sysconfdir}/scl/prefixes/%scl
}
%scl_install %{expand:
mkdir -p %{buildroot}%{_root_sysconfdir}/{rpm,scl/prefixes}
echo -n '%' > %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config << EOF
scl %scl
EOF
cat >> %{buildroot}%{_root_sysconfdir}/scl/prefixes/%{scl} << EOF
%_scl_prefix
EOF
}

66
macros.scl Normal file
View File

@ -0,0 +1,66 @@
# scl-utils RPM macros
#
# Copyright (C) 2012 Red Hat, Inc.
# Written by Jindrich Novy <jnovy@redhat.com>.
%scl_package() %{expand:%{!?_root_prefix:
%global pkg_name %1
%global scl_short_prefix scl
%global scl_name %{scl_short_prefix}_%{scl}
%global scl_runtime %{scl_name}-runtime
%global scl_prefix %{scl_name}_
%{!?_scl_prefix: %global _scl_prefix /opt/rh}
%global _scl_scripts %{_scl_prefix}/%{scl}
%global _scl_root %{_scl_prefix}/%{scl}/root
%global _root_prefix %{_prefix}
%global _root_exec_prefix %{_root_prefix}
%global _root_bindir %{_exec_prefix}/bin
%global _root_sbindir %{_exec_prefix}/sbin
%global _root_libexecdir %{_exec_prefix}/libexec
%global _root_datadir %{_prefix}/share
%global _root_sysconfdir %{_sysconfdir}
%global _root_sharedstatedir %{_prefix}/com
%global _root_localstatedir %{_prefix}/var
%global _root_libdir %{_exec_prefix}/%{_lib}
%global _root_includedir %{_prefix}/include
%global _root_infodir %{_datadir}/info
%global _root_mandir %{_datadir}/man
%global _root_initddir %{_sysconfdir}/rc.d/init.d
%global _prefix %{_scl_root}/usr
%global _exec_prefix %{_prefix}
%global _bindir %{_exec_prefix}/bin
%global _sbindir %{_exec_prefix}/sbin
%global _libexecdir %{_exec_prefix}/libexec
%global _datadir %{_prefix}/share
%global _sysconfdir %{_scl_root}/etc
%global _sharedstatedir %{_prefix}/com
%global _localstatedir %{_prefix}/var
%global _libdir %{_exec_prefix}/%{_lib}
%global _includedir %{_prefix}/include
%global _infodir %{_datadir}/info
%global _mandir %{_datadir}/man
%global _docdir %{_datadir}/doc
%global _defaultdocdir %{_docdir}
%global scl_pkg_name %{scl_short_prefix}_%{scl}_%{pkg_name}
BuildRequires: scl-utils-build
}}
%scl_require() %{_scl_prefix}/%1/enable
%scl_files %{expand:
%{_scl_root}
%{_scl_scripts}
%{_scl_scripts}/enable
%{_root_sysconfdir}/scl/prefixes/%scl
}
%scl_install %{expand:
mkdir -p %{buildroot}%{_root_sysconfdir}/{rpm,scl/prefixes}
echo -n '%' > %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config
cat >> %{buildroot}%{_root_sysconfdir}/rpm/macros.%{scl}-config << EOF
scl %scl
EOF
cat >> %{buildroot}%{_root_sysconfdir}/scl/prefixes/%{scl} << EOF
%_scl_prefix
EOF
}

View File

@ -1,12 +1,11 @@
Summary: Utilities for alternative packaging Summary: Utilities for alternative packaging
Name: scl-utils Name: scl-utils
Version: 20120111 Version: 20120125
Release: 1%{?dist} Release: 1%{?dist}
License: GPLv2+ License: GPLv2+
Group: Applications/File Group: Applications/File
URL: http://jnovy.fedorapeople.org/scl-utils/ URL: http://jnovy.fedorapeople.org/scl-utils/
Source0: http://jnovy.fedorapeople.org/scl-utils/%{name}-%{version}.tar.gz Source0: http://jnovy.fedorapeople.org/scl-utils/%{name}-%{version}.tar.gz
Provides: dsc-utils = %version
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description %description
@ -15,7 +14,6 @@ Run-time utility for alternative packaging.
%package build %package build
Summary: RPM build macros for alternative packaging Summary: RPM build macros for alternative packaging
Group: Applications/File Group: Applications/File
Provides: dsc-utils-build = %version
%description build %description build
Essential RPM build macros for alternative packaging. Essential RPM build macros for alternative packaging.
@ -41,15 +39,18 @@ rm -rf %buildroot
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir /opt/rh %dir /opt/rh
%dir %{_sysconfdir}/scl/prefixes %dir %{_sysconfdir}/scl/prefixes
%{_bindir}/dsc
%{_bindir}/scl %{_bindir}/scl
%{_bindir}/scl_enabled %{_bindir}/scl_enabled
%files build %files build
%defattr(-,root,root,-) %defattr(-,root,root,-)
%{_sysconfdir}/rpm/macros.dsc %{_sysconfdir}/rpm/macros.scl
%changelog %changelog
* Wed Jan 25 2012 Jindrich Novy <jnovy@redhat.com> 20120125-1
- remove dsc macros
- trigger scl-utils-build BR inclusion while using scl macros
* Wed Jan 11 2012 Jindrich Novy <jnovy@redhat.com> 20120111-1 * Wed Jan 11 2012 Jindrich Novy <jnovy@redhat.com> 20120111-1
- add "dsc" alias to "scl" utility - add "dsc" alias to "scl" utility

View File

@ -1 +1 @@
f48a6288f723b109b8af16b71bb6cc29 scl-utils-20120111.tar.gz 0b360ad5b6e36615d1b53f55075a787e scl-utils-20120125.tar.gz