Permalink
Browse files

Initial commit

  • Loading branch information...
athos-ribeiro committed Aug 13, 2018
0 parents commit 028ba5f589482db54e178954e3ac6c41b0dd6144
Showing with 118 additions and 0 deletions.
  1. +10 −0 Makefile
  2. +23 −0 clang_build
  3. +6 −0 clang_build.service
  4. +5 −0 debian/changelog
  5. +1 −0 debian/compat
  6. +16 −0 debian/control
  7. +41 −0 debian/copyright
  8. +15 −0 debian/rules
  9. +1 −0 debian/source/format
@@ -0,0 +1,10 @@
DESTDIR ?=
PREFIX = /usr
mylibdir = $(PREFIX)/lib/obs/service
.PHONY: install
install:
mkdir -p $(DESTDIR)$(mylibdir)
install -m 0644 clang_build.service $(DESTDIR)$(mylibdir)/clang_build.service
install -m 0755 clang_build $(DESTDIR)$(mylibdir)/clang_build
@@ -0,0 +1,23 @@
#!/bin/bash
set -x
echo "Entering customization script..."
CLANG_VERSION="6.0"
echo "Replace gcc, g++ & cpp by clang"
VERSIONS="4.6 4.7 4.8 4.9 5 6 7 8"
cd /usr/bin
for VERSION in $VERSIONS; do
rm -f g++-$VERSION gcc-$VERSION cpp-$VERSION gcc
ln -s clang++-$CLANG_VERSION g++-$VERSION
ln -s clang-$CLANG_VERSION gcc-$VERSION
ln -s clang-$CLANG_VERSION cpp-$VERSION
ln -s clang-$CLANG_VERSION gcc
echo "gcc-$VERSION hold"|dpkg --set-selections
echo "g++-$VERSION hold"|dpkg --set-selections
done
cd -
echo "Check if gcc, g++ & cpp are actually clang"
gcc --version|grep clang > /dev/null || exit 1
cpp --version|grep clang > /dev/null || exit 1
g++ --version|grep clang > /dev/null || exit 1
@@ -0,0 +1,6 @@
<service name="clang_build">
<summary>Build packages against Clang</summary>
<description>
This service substitutes CC and CXX for clang before builds
</description>
</service>
@@ -0,0 +1,5 @@
obs-service-clang-build (0.1-1) unstable; urgency=medium
* Initial release
-- Athos Ribeiro <athoscribeiro@gmai.com> Wed, 25 Jul 2018 18:58:36 +0000
@@ -0,0 +1 @@
11
@@ -0,0 +1,16 @@
Source: obs-service-clang-build
Section: devel
Priority: extra
Maintainer: Athos Ribeiro <athoscribeiro@gmail.com>
Build-Depends: debhelper (>= 11)
Standards-Version: 4.1.3
Homepage: https://athoscr.me
#Vcs-Browser: https://salsa.debian.org/debian/obs-service-clang-build
#Vcs-Git: https://salsa.debian.org/debian/obs-service-clang-build.git
Package: obs-service-clang-build
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: OBS Source Service: substitute gcc binaries for clang.
WARNING - This is a destructive package that removes GCC binaries. Use at your
own risk.
@@ -0,0 +1,41 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: obs-service-clang-build
Source: https://athoscr.me
Files: *
Copyright: 2018 Athos Ribeiro <athoscribeiro@gmail.com>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
Files: debian/*
Copyright: 2018 Athos Ribeiro <athoscribeiro@gmail.com>
License: GPL-2+
This package is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>
.
On Debian systems, the complete text of the GNU General
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
@@ -0,0 +1,15 @@
#!/usr/bin/make -f
# -*- makefile -*-
#
export DH_VERBOSE=1
DESTDIR=debian/obs-service-clang-build
%:
dh $@
override_dh_auto_build: ;
override_dh_auto_test: ;
override_dh_auto_install:
$(MAKE) DESTDIR=`pwd`/$(DESTDIR) PREFIX=/usr install
@@ -0,0 +1 @@
3.0 (quilt)

0 comments on commit 028ba5f

Please sign in to comment.