Skip to content
This repository has been archived by the owner on Dec 12, 2022. It is now read-only.

Package2replacefsutils #3

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions debian/android-sdk-libsparse-utils.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/dh-exec

libsparse/simg_dump.py => usr/bin/simg_dump
libsparse/simg2simg usr/bin
libsparse/img2simg usr/bin
29 changes: 20 additions & 9 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Build-Depends: android-libunwind-dev (>= 7.0.0+r1~) [amd64 i386 armel armhf arm6
bash-completion,
debhelper (>= 10),
dh-exec,
python,
dpkg-dev (>= 1.17.14),
libsafe-iop-dev [amd64 i386 armel armhf arm64 mips mipsel mips64el],
libssl-dev [amd64 i386 armel armhf arm64 mips mipsel mips64el],
Expand All @@ -22,6 +23,23 @@ Homepage: https://android.googlesource.com/platform/system/core
Vcs-Git: https://salsa.debian.org/android-tools-team/android-platform-system-core.git
Vcs-Browser: https://salsa.debian.org/android-tools-team/android-platform-system-core

Package: android-tools-fsutils
Depends: android-sdk-libsparse-utils, android-sdk-ext4-utils, simg2img, ${shlibs:Depends}, ${misc:Depends}
Architecture: all
Priority: optional
Section: oldlibs
Description: Transitional package
This is a transitional package. It can safely be removed.


Package: android-sdk-libsparse-utils
Architecture: amd64 i386
Depends: python,${shlibs:Depends}, ${misc:Depends}
Breaks: android-tools-fsutils (<< 5.1.1.r38-1.1~)
Replaces: android-tools-fsutils (<< 5.1.1.r38-1.1~)
Description: Android sparse image creation tool
Command line tools to create sparse images for usage with Android devices.

Package: android-liblog
Section: libs
Architecture: amd64 i386 armel armhf arm64 mips mipsel mips64el
Expand Down Expand Up @@ -253,19 +271,12 @@ Description: Android fastboot tool
Package: simg2img
Architecture: amd64 i386
Depends: ${shlibs:Depends}, ${misc:Depends}
Breaks: android-tools-fsutils (<< 6.0~)
Replaces: android-tools-fsutils (<< 6.0~)
Breaks: android-tools-fsutils (<< 5.1.1.r38-1.1~)
Replaces: android-tools-fsutils (<< 5.1.1.r38-1.1~)
Description: Android sparse image conversion tool
A command line tool to convert sparse images to raw images, which can then
be manipulated with the standard tools.

Package: img2simg
Architecture: amd64 i386
Depends: ${shlibs:Depends}, ${misc:Depends}
Breaks: android-tools-fsutils (<< 6.0~)
Replaces: android-tools-fsutils (<< 6.0~)
Description: Android sparse image creation tool
A command line tool to create sparse images for usage with Android devices.

Package: append2simg
Architecture: amd64 i386
Expand Down
1 change: 0 additions & 1 deletion debian/img2simg.docs

This file was deleted.

1 change: 0 additions & 1 deletion debian/img2simg.install

This file was deleted.

6 changes: 5 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export DEB_LDFLAGS_MAINT_APPEND = -fPIC
STAGE1_COMPONENTS = adb \
simg2img \
img2simg \
simg2simg \
append2simg \
libadb.so \
libbacktrace.so \
Expand Down Expand Up @@ -64,13 +65,16 @@ fastboot: debian/fastboot.mk libziparchive.so libsparse.so libbase.so libcutils.
simg2img: debian/simg2img.mk libsparse.so
make -f $<

simg2simg: debian/simg2simg.mk libsparse.so
make -f $<

img2simg: debian/img2simg.mk libsparse.so
make -f $<

append2simg: debian/append2simg.mk libsparse.so
make -f $<

.PHONY: adb fastboot simg2img img2simg append2simg
.PHONY: adb fastboot simg2img img2simg simg2simg append2simg

%:
dh $@ --with bash-completion
Expand Down
13 changes: 13 additions & 0 deletions debian/simg2simg.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
NAME = simg2simg
SOURCES = simg2simg.c sparse_crc32.c
SOURCES := $(foreach source, $(SOURCES), libsparse/$(source))
CFLAGS += -Ilibsparse/include -fpermissive
LDFLAGS += -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
-Wl,-rpath-link=. \
-lz -L. -lsparse

build: $(SOURCES)
$(CXX) $^ -o libsparse/$(NAME) $(CFLAGS) $(LDFLAGS)

clean:
$(RM) libsparse/$(NAME)