summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorQue Quotion2018-10-25 02:28:35 +0900
committerQue Quotion2018-10-25 02:28:35 +0900
commit1f26bc031d05eb25d12810964e29f00788d1f9e4 (patch)
tree81722eac9f6b3e3dc572cb91a701f90d05f0c447
parent00b4663035f5a907c5170253ce762f6df4ee7975 (diff)
downloadaur-1f26bc031d05eb25d12810964e29f00788d1f9e4.tar.gz
Supplemental ARCHITECTURE, COMPILE FLAGS; more rational sed replacements; link to archwiki
-rw-r--r--.SRCINFO38
-rw-r--r--PKGBUILD72
-rw-r--r--cflags.conf3
-rw-r--r--cmake-flags.conf4
-rw-r--r--cxxflags.conf1
-rw-r--r--debug-makeflags.conf1
-rw-r--r--ldflags.conf1
-rw-r--r--makeflags.conf1
8 files changed, 84 insertions, 37 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cabbafa40f6..dc127d87b01 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,8 +1,8 @@
pkgbase = makepkg-optimize
pkgdesc = Supplemental build and packaging optimizations for makepkg
pkgver = 2
- pkgrel = 1
- url = https://bbs.archlinux.org/viewtopic.php?id=210350
+ pkgrel = 2
+ url = https://wiki.archlinux.org/index.php/Makepkg-optimize
arch = any
license = GPL
depends = pacman-buildenv_ext-git
@@ -20,22 +20,34 @@ pkgbase = makepkg-optimize
source = upx.sh.in
source = optipng.sh.in
source = svgo.sh.in
+ source = cflags.conf
+ source = cxxflags.conf
+ source = makeflags.conf
+ source = ldflags.conf
+ source = debug-makeflags.conf
+ source = cmake-flags.conf
source = buildenv_ext.conf
source = destdirs_ext.conf
source = pkgopts_ext.conf
source = pkgopts-param_ext.conf
source = compress-param_max.conf
- sha512sums = cc885a45311f60f3512d562ca6502ec7a38440383bae4df82c6cb34f5fe4ff8f7fe9c627bea0aadd32c34ea531ab4acc50a04271d1dc0b807a3e3f34b3f29289
- sha512sums = 566681dfc0a84f6b3f654250bb0967bfe13563ad6dcae13d9cc6e30b359f34544c5f473e3b23973e0406e405c7047d866d6459bf999c0579ff43b36d1615bfe0
- sha512sums = 4cda8968bf9e2a1cd7f20987183b91be8becec190c7a56a5d47fecb1da373077190af0c7be627338160c371d4b3c68cb12b76783e9118de29df30a285f9e5bd9
- sha512sums = 0cbcc6590b901ac33dc78b755300da02070c5abb68153a55eb7b1bf5426dd37286f5831185c53eff189fc689796a234bad84fddc8e8f43edf6b19f13667291c7
- sha512sums = c2b109f3f167f61fb0cbe3580a190189f0aac9b5886cf9aba447e2e074179cd1a506d54cbc0ae4df59ff3e3d537e8d3176786a805cfcba7f90525d135824fd6b
- sha512sums = 917fd21b7dcb7ccb1d82bae4e31e65fd7610c4ca0b01db2ee1a379828240c59a6eeae176e1221b04421ace5ad89a871669def4730120741173e48b05c117aadb
- sha512sums = 61672f1db64ca633dd3139ee1d5d9a2009f94f6b0de0bdf9466a51bbe397f1f410fda717b8ff775e85e1ec7dc9f2313653af2ddbbf1835c66475cdeed7f67218
- sha512sums = e3b61fa175c7c086b5e40413e280afa59efae64f6a29ec03f395b48d6a4ee7086603c9a8295a36cb0d091ef28bf3444d02e78b288db2225d29336aac23eda317
- sha512sums = abe0b14869417dfe978beeb57b9527bc3c3651ddd5a88e9a5293438e3d1ebcde41a58f60bc0d0e68b6d8b4ede228904b520a3e10ac26c8572110a312a38e15b6
- sha512sums = 16ad444485cdee165f00a2e1a24ff9f74fad43c8da959feaa196be1719e67e3153daac6661b116e2351a55091504056cb7bc785943092f9f9fdaa46bd5f0d3d9
- sha512sums = bbc69d237a4be0b91d3e8197d40ddb3a587c4f4c4a1fb233d3249689543ad66d56b3aef02d886f6f7d9e5a52c64a45f2d44772156bb01a50ac8e769fdc30dbe7
+ sha1sums = 108b124167751bc975cc1bce5a2905956ed5c65b
+ sha1sums = a95642b0b45d3c2f0b665806e016a52f9880195f
+ sha1sums = 0726a57eeb0c08bc4ba50b28ee5ea3b5e6dbd156
+ sha1sums = 0420fde975c623f788726a41da2c1311e625472f
+ sha1sums = 261dfa6707cc12159f99a567617f7183426dbaa3
+ sha1sums = be019624f503380130994503b5169836edb83a35
+ sha1sums = 0999f5246a10235e886eff0977582dfed43ad30c
+ sha1sums = 83a6d62b19184cac1de02c957cd4ea7bbdac9ddb
+ sha1sums = dea4d727d81ac040846555e59ac7c34eb0978233
+ sha1sums = 202d11e49a611bb400029512cf159a0f8645a6db
+ sha1sums = 2e2cd8c680a86518652543fda9092bf2ab594660
+ sha1sums = 981eab856abb43c5e093620cdf4d8bfa2d690805
+ sha1sums = a2d4cc385d2395ec35094f63dc17847e73bbd565
+ sha1sums = 357102cec0aa56d74955bbf66ae694db74627dab
+ sha1sums = 1fc8035e64b739e20c70fbb4eaa5cb7aa1c63c90
+ sha1sums = 5d0cde13b50641371e4ec4d813d6b2dfae493889
+ sha1sums = f5fe14a39dd4fe2117bf764d67cf2609ca48229b
pkgname = makepkg-optimize
diff --git a/PKGBUILD b/PKGBUILD
index e0f291eaba5..c77e67b77e8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,11 +3,11 @@
pkgname=makepkg-optimize
pkgver=2
-pkgrel=1
+pkgrel=2
pkgdesc='Supplemental build and packaging optimizations for makepkg'
arch=('any')
license=('GPL')
-url='https://bbs.archlinux.org/viewtopic.php?id=210350'
+url='https://wiki.archlinux.org/index.php/Makepkg-optimize'
conflicts=(makepkg-optimize{,2})
replaces=('makepkg-optimize2')
depends=('pacman-buildenv_ext-git')
@@ -15,22 +15,28 @@ optdepends=('upx' 'optipng' 'nodejs-svgo' 'graphite')
backup=(etc/makepkg-optimize.conf)
_buildenv_ext=({pgo,lto,graphite}.sh.in)
_tidy=({upx,optipng,svgo}.sh.in)
-_conf=({buildenv,destdirs,pkgopts{,-param}}_ext.conf 'compress-param_max.conf')
+_conf=({{c,cxx,make,ld,debug-make,cmake-}flags,{buildenv,destdirs,pkgopts{,-param}}_ext,compress-param_max}.conf)
source=(${_buildenv_ext[@]}
${_tidy[@]}
${_conf[@]}
)
-sha512sums=('cc885a45311f60f3512d562ca6502ec7a38440383bae4df82c6cb34f5fe4ff8f7fe9c627bea0aadd32c34ea531ab4acc50a04271d1dc0b807a3e3f34b3f29289'
- '566681dfc0a84f6b3f654250bb0967bfe13563ad6dcae13d9cc6e30b359f34544c5f473e3b23973e0406e405c7047d866d6459bf999c0579ff43b36d1615bfe0'
- '4cda8968bf9e2a1cd7f20987183b91be8becec190c7a56a5d47fecb1da373077190af0c7be627338160c371d4b3c68cb12b76783e9118de29df30a285f9e5bd9'
- '0cbcc6590b901ac33dc78b755300da02070c5abb68153a55eb7b1bf5426dd37286f5831185c53eff189fc689796a234bad84fddc8e8f43edf6b19f13667291c7'
- 'c2b109f3f167f61fb0cbe3580a190189f0aac9b5886cf9aba447e2e074179cd1a506d54cbc0ae4df59ff3e3d537e8d3176786a805cfcba7f90525d135824fd6b'
- '917fd21b7dcb7ccb1d82bae4e31e65fd7610c4ca0b01db2ee1a379828240c59a6eeae176e1221b04421ace5ad89a871669def4730120741173e48b05c117aadb'
- '61672f1db64ca633dd3139ee1d5d9a2009f94f6b0de0bdf9466a51bbe397f1f410fda717b8ff775e85e1ec7dc9f2313653af2ddbbf1835c66475cdeed7f67218'
- 'e3b61fa175c7c086b5e40413e280afa59efae64f6a29ec03f395b48d6a4ee7086603c9a8295a36cb0d091ef28bf3444d02e78b288db2225d29336aac23eda317'
- 'abe0b14869417dfe978beeb57b9527bc3c3651ddd5a88e9a5293438e3d1ebcde41a58f60bc0d0e68b6d8b4ede228904b520a3e10ac26c8572110a312a38e15b6'
- '16ad444485cdee165f00a2e1a24ff9f74fad43c8da959feaa196be1719e67e3153daac6661b116e2351a55091504056cb7bc785943092f9f9fdaa46bd5f0d3d9'
- 'bbc69d237a4be0b91d3e8197d40ddb3a587c4f4c4a1fb233d3249689543ad66d56b3aef02d886f6f7d9e5a52c64a45f2d44772156bb01a50ac8e769fdc30dbe7')
+sha1sums=('108b124167751bc975cc1bce5a2905956ed5c65b'
+ 'a95642b0b45d3c2f0b665806e016a52f9880195f'
+ '0726a57eeb0c08bc4ba50b28ee5ea3b5e6dbd156'
+ '0420fde975c623f788726a41da2c1311e625472f'
+ '261dfa6707cc12159f99a567617f7183426dbaa3'
+ 'be019624f503380130994503b5169836edb83a35'
+ '0999f5246a10235e886eff0977582dfed43ad30c'
+ '83a6d62b19184cac1de02c957cd4ea7bbdac9ddb'
+ 'dea4d727d81ac040846555e59ac7c34eb0978233'
+ '202d11e49a611bb400029512cf159a0f8645a6db'
+ '2e2cd8c680a86518652543fda9092bf2ab594660'
+ '981eab856abb43c5e093620cdf4d8bfa2d690805'
+ 'a2d4cc385d2395ec35094f63dc17847e73bbd565'
+ '357102cec0aa56d74955bbf66ae694db74627dab'
+ '1fc8035e64b739e20c70fbb4eaa5cb7aa1c63c90'
+ '5d0cde13b50641371e4ec4d813d6b2dfae493889'
+ 'f5fe14a39dd4fe2117bf764d67cf2609ca48229b')
prepare() {
# Use the current makepkg config as a base
@@ -40,20 +46,38 @@ prepare() {
sed -i "s|@libmakepkgdir@|/usr/share/makepkg|g" *.sh.in
for file in *.sh.in; do mv $file ${file%.in}; done
- #Comment on additional BUIDENV options
- sed -i "/#-- sign/r buildenv_ext.conf" makepkg-optimize.conf
+ #Extra ricer and debugging CFLAGS
+ sed -i "/^CFLAGS/r cflags.conf" makepkg-optimize.conf
- #Comment on additional ~~DEST directories
- sed -i "/SRCPKGDEST=/r destdirs_ext.conf" makepkg-optimize.conf
+ #Mirror CFLAGS into CXXFLAGS
+ sed -i "/^CXXFLAGS/r cxxflags.conf" makepkg-optimize.conf
- #Comment on additional OPTIONS options
- sed -i "/#-- debug/r pkgopts_ext.conf" makepkg-optimize.conf
+ #Extra ricer Makeflags
+ sed -i "/^MAKEFLAGS/r makeflags.conf" makepkg-optimize.conf
- #Comment on additional OPTIONS options parameters
- sed -i "/PURGE_TARGETS=/r pkgopts-param_ext.conf" makepkg-optimize.conf
+ #Extra ricer LDFLAGS
+ sed -i "/^LDFLAGS/r ldflags.conf" makepkg-optimize.conf
- #Comment on maximum COMPRESS~~ parameters
- sed -i "/COMPRESSZ=/r compress-param_max.conf" makepkg-optimize.conf
+ #Debugging flags for make
+ sed -i "/^DEBUG_CXXFLAGS/r debug-makeflags.conf" makepkg-optimize.conf
+
+ #CMAKE IS A BUILD OBFUSCATION SYSTEM
+ sed -i "/^#DEBUG_MAKEFLAGS/r cmake-flags.conf" makepkg-optimize.conf
+
+ #Additional BUIDENV options
+ sed -i "/^#-- sign/r buildenv_ext.conf" makepkg-optimize.conf
+
+ #Additional ~~DEST directories
+ sed -i "/^#*SRCPKGDEST=/r destdirs_ext.conf" makepkg-optimize.conf
+
+ #Additional OPTIONS options
+ sed -i "/^#-- debug/r pkgopts_ext.conf" makepkg-optimize.conf
+
+ #Additional OPTIONS options parameters
+ sed -i "/^#*PURGE_TARGETS=/r pkgopts-param_ext.conf" makepkg-optimize.conf
+
+ #Maximum COMPRESS~~ parameters
+ sed -i "/^COMPRESSZ=/r compress-param_max.conf" makepkg-optimize.conf
}
package() {
diff --git a/cflags.conf b/cflags.conf
new file mode 100644
index 00000000000..cee6e99af11
--- /dev/null
+++ b/cflags.conf
@@ -0,0 +1,3 @@
+#CFLAGS="-pipe -march=native -Ofast -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt -Wno-error -w" #
+#CFLAGS="-pipe -march=native -Og -fstack-protector-strong --param=ssp-buffer-size=4 -fno-plt" #
+#CXXFLAGS="$CFLAGS" #
diff --git a/cmake-flags.conf b/cmake-flags.conf
new file mode 100644
index 00000000000..db0077b91d8
--- /dev/null
+++ b/cmake-flags.conf
@@ -0,0 +1,4 @@
+#-- CMAKE flags
+#CMAKE_C_COMPILER="command gcc $CFLAGS"
+#CMAKE_CXX_COMPILER="command g++ $CXXFLAGS"
+#CMAKE_LINKER="command ld $LDFLAGS"
diff --git a/cxxflags.conf b/cxxflags.conf
new file mode 100644
index 00000000000..4e8d39730dd
--- /dev/null
+++ b/cxxflags.conf
@@ -0,0 +1 @@
+#CXXFLAGS="$CFLAGS" #
diff --git a/debug-makeflags.conf b/debug-makeflags.conf
new file mode 100644
index 00000000000..f74d3d8d1b5
--- /dev/null
+++ b/debug-makeflags.conf
@@ -0,0 +1 @@
+#DEBUG_MAKEFLAGS="-j1 --debug=bvij"
diff --git a/ldflags.conf b/ldflags.conf
new file mode 100644
index 00000000000..056abbc8227
--- /dev/null
+++ b/ldflags.conf
@@ -0,0 +1 @@
+#LDFLAGS="-Wl,-O4,--sort-common,--as-needed,-z,relro,-z,now,-lgomp" #
diff --git a/makeflags.conf b/makeflags.conf
new file mode 100644
index 00000000000..b4cb4048a89
--- /dev/null
+++ b/makeflags.conf
@@ -0,0 +1 @@
+#MAKEFLAGS="-j$(getconf _NPROCESSORS_ONLN) --quiet" #