Created
April 30, 2017 15:18
-
-
Save yan12125/676f79c907af519a48b5ae49fdb11e1e to your computer and use it in GitHub Desktop.
simg2img-git
This file contains hidden or 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
diff --git a/libsparse/sparse_read.cpp b/libsparse/sparse_read.cpp | |
index bd668735a..6168f2e24 100644 | |
--- a/libsparse/sparse_read.cpp | |
+++ b/libsparse/sparse_read.cpp | |
@@ -26,6 +26,7 @@ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string> | |
+#include <string.h> | |
#include <unistd.h> | |
#include <sparse/sparse.h> |
This file contains hidden or 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
COMMON_OBJECTS=sparse_crc32.o \ | |
backed_block.o \ | |
output_file.o \ | |
sparse.o \ | |
sparse_err.o \ | |
sparse_read.o \ | |
stringprintf.o | |
TARGETS=simg2img \ | |
append2simg \ | |
img2simg \ | |
simg2simg | |
CFLAGS=-Iinclude -I../base/include | |
CXXFLAGS=$(CFLAGS) | |
.PHONY: all | |
all: $(TARGETS) | |
%: %.o $(COMMON_OBJECTS) | |
g++ -o $@ $^ -lz | |
%.o: %.c | |
gcc -o $@ $(CFLAGS) -c $< | |
stringprintf.o: ../base/stringprintf.cpp | |
g++ -o $@ $(CXXFLAGS) -c $< | |
%.o: %.cpp | |
g++ -o $@ $(CXXFLAGS) -c $< | |
This file contains hidden or 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
# Maintainer: Christoph Scholz <[email protected]> | |
pkgname=simg2img-git | |
pkgver=r29490.4c8acafa2 | |
pkgrel=1 | |
pkgdesc="Tools to handle/convert Android sparse image file" | |
arch=('i686' 'x86_64') | |
url="https://android.googlesource.com/platform/system/core" | |
license=('Apache') | |
depends=('zlib') | |
makedepends=('git') | |
source=("git+https://android.googlesource.com/platform/system/core" | |
Makefile | |
fix-missing-memset.patch) | |
md5sums=('SKIP' | |
'b817669fdfc1fbcce0756bcbd0b3a6ee' | |
'93b67200bdd2fde3c0a2ef32351417be') | |
pkgver() { | |
cd "${srcdir}/core/libsparse" | |
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" | |
} | |
prepare() { | |
cd "${srcdir}/core" | |
patch -Np1 -i ../fix-missing-memset.patch | |
} | |
build() { | |
cd "${srcdir}/core/libsparse" | |
make -f "${srcdir}/Makefile" --no-builtin-rules | |
} | |
package() { | |
cd "${srcdir}/core/libsparse" | |
install -D -m 755 -t "${pkgdir}/usr/bin/" simg2img append2simg img2simg simg2simg | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment