-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 028ba5f
Showing
9 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
3.0 (quilt) |