mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-07 20:42:09 -05:00
opt: cygfuse: refactoring
This commit is contained in:
parent
5d73687de8
commit
d7c0657c3d
1
opt/cygfuse/.gitignore
vendored
Normal file
1
opt/cygfuse/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
build
|
39
opt/cygfuse/Makefile
Normal file → Executable file
39
opt/cygfuse/Makefile
Normal file → Executable file
@ -1,30 +1,33 @@
|
|||||||
Version = $(shell sed -n '/^VERSION=/s/VERSION=\(.*\)/\1/p' fuse.cygport)
|
Arch = $(shell uname -m)
|
||||||
#Debug = -g
|
Build = build
|
||||||
|
|
||||||
cygfuse-$(Version).dll libfuse-$(Version).dll.a fuse.pc: cygfuse.c fuse.pc.in
|
.PHONY: usage
|
||||||
gcc $(Debug) -shared -o cygfuse-$(Version).dll -Wl,--out-implib=libfuse-$(Version).dll.a -I../../inc/fuse cygfuse.c
|
usage:
|
||||||
[ -n "$(Debug)" ] || strip cygfuse-$(Version).dll
|
@echo "make cygport|dist" 1>&2
|
||||||
sed "s/@Version@/$(Version)/g" fuse.pc.in > fuse.pc
|
@exit 2
|
||||||
|
|
||||||
cygfuse-test.exe: cygfuse-test.c cygfuse-$(Version).dll libfuse-$(Version).dll.a
|
|
||||||
gcc $(Debug) -o cygfuse-test.exe -I../../inc/fuse -DCYGFUSE cygfuse-test.c -L$(PWD) -lfuse-$(Version)
|
|
||||||
|
|
||||||
|
.PHONY: cygport
|
||||||
cygport:
|
cygport:
|
||||||
git clean -dfx
|
rm -rf $(Build)
|
||||||
|
mkdir -p $(Build)
|
||||||
( \
|
( \
|
||||||
cd `git rev-parse --show-toplevel` && \
|
cd `git rev-parse --show-toplevel` && \
|
||||||
Stash=`git stash create` && \
|
Stash=`git stash create` && \
|
||||||
git archive --prefix=winfsp-work/ --format=tar.gz $${Stash:-HEAD}\
|
git archive --prefix=winfsp-work-$(Arch)/ --format=tar.gz $${Stash:-HEAD} \
|
||||||
> opt/cygfuse/winfsp-work.tar.gz\
|
) > $(Build)/winfsp-work-$(Arch).tar.gz
|
||||||
)
|
cp fuse/fuse.cygport $(Build)/fuse.cygport
|
||||||
CYGPORT_SRC_URI=winfsp-work.tar.gz CYGPORT_SRC_DIR=winfsp-work cygport fuse.cygport download prep compile install package
|
CYGPORT_SRC_URI=winfsp-work-$(Arch).tar.gz CYGPORT_SRC_DIR=winfsp-work-$(Arch) \
|
||||||
|
cygport $(Build)/fuse.cygport download prep compile install package
|
||||||
|
|
||||||
|
.PHONY: dist
|
||||||
dist: cygport
|
dist: cygport
|
||||||
case $(shell uname -m) in \
|
case $(Arch) in \
|
||||||
x86_64) \
|
x86_64) \
|
||||||
mkdir -p dist/x64 && \
|
mkdir -p dist/x64 && \
|
||||||
cp fuse-*/dist/fuse/fuse-*[0-9].tar.xz dist/x64 ;;\
|
rm -f dist/x64/fuse-*[0-9].tar.xz && \
|
||||||
*)\
|
cp build/fuse-*[0-9].$(Arch)/dist/fuse/fuse-*[0-9].tar.xz dist/x64 ;; \
|
||||||
|
i686) \
|
||||||
mkdir -p dist/x86 && \
|
mkdir -p dist/x86 && \
|
||||||
cp fuse-*/dist/fuse/fuse-*[0-9].tar.xz dist/x86 ;;\
|
rm -f dist/x86/fuse-*[0-9].tar.xz && \
|
||||||
|
cp build/fuse-*[0-9].$(Arch)/dist/fuse/fuse-*[0-9].tar.xz dist/x86 ;; \
|
||||||
esac
|
esac
|
||||||
|
29
opt/cygfuse/fuse/Makefile
Normal file
29
opt/cygfuse/fuse/Makefile
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
Version = $(shell sed -n '/^VERSION=/s/VERSION=\(.*\)/\1/p' fuse.cygport)
|
||||||
|
Arch = $(shell uname -m)
|
||||||
|
Build = build/$(Arch)
|
||||||
|
#Debug = -g
|
||||||
|
|
||||||
|
.PHONY: build test
|
||||||
|
build: $(Build)/cygfuse-$(Version).dll $(Build)/fuse.pc
|
||||||
|
test: $(Build)/cygfuse-test.exe
|
||||||
|
|
||||||
|
$(Build)/cygfuse-$(Version).dll: cygfuse.c fuse.cygport
|
||||||
|
@mkdir -p $(Build)
|
||||||
|
gcc $(Debug) \
|
||||||
|
-shared -o $(Build)/cygfuse-$(Version).dll \
|
||||||
|
-Wl,--out-implib=$(Build)/libfuse-$(Version).dll.a \
|
||||||
|
-I../../../inc/fuse \
|
||||||
|
cygfuse.c
|
||||||
|
[ -n "$(Debug)" ] || strip $(Build)/cygfuse-$(Version).dll
|
||||||
|
|
||||||
|
$(Build)/fuse.pc: fuse.pc.in fuse.cygport
|
||||||
|
@mkdir -p $(Build)
|
||||||
|
sed "s/@Version@/$(Version)/g" fuse.pc.in > $(Build)/fuse.pc
|
||||||
|
|
||||||
|
$(Build)/cygfuse-test.exe: cygfuse-test.c $(Build)/cygfuse-$(Version).dll
|
||||||
|
@mkdir -p $(Build)
|
||||||
|
gcc $(Debug) \
|
||||||
|
-o $(Build)/cygfuse-test.exe \
|
||||||
|
-I../../../inc/fuse -DCYGFUSE \
|
||||||
|
cygfuse-test.c \
|
||||||
|
-L$(PWD)/$(Build) -lfuse-$(Version)
|
@ -1,5 +1,5 @@
|
|||||||
/**
|
/**
|
||||||
* @file cygfuse/cygfuse.c
|
* @file fuse/cygfuse.c
|
||||||
*
|
*
|
||||||
* @copyright 2015-2018 Bill Zissimopoulos
|
* @copyright 2015-2018 Bill Zissimopoulos
|
||||||
*/
|
*/
|
@ -1,6 +1,6 @@
|
|||||||
NAME="fuse"
|
NAME="fuse"
|
||||||
VERSION=2.8
|
VERSION=2.8
|
||||||
RELEASE=8
|
RELEASE=9
|
||||||
CATEGORY="Utils"
|
CATEGORY="Utils"
|
||||||
SUMMARY="WinFsp-FUSE compatibility layer"
|
SUMMARY="WinFsp-FUSE compatibility layer"
|
||||||
DESCRIPTION="WinFsp-FUSE enables FUSE file systems to be run on Cygwin."
|
DESCRIPTION="WinFsp-FUSE enables FUSE file systems to be run on Cygwin."
|
||||||
@ -12,7 +12,7 @@ SRC_DIR=${CYGPORT_SRC_DIR:-winfsp-master}
|
|||||||
src_compile()
|
src_compile()
|
||||||
{
|
{
|
||||||
lndirs
|
lndirs
|
||||||
cd ${B}/opt/cygfuse
|
cd ${B}/opt/cygfuse/fuse
|
||||||
make
|
make
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ src_install()
|
|||||||
doinclude fuse_opt.h
|
doinclude fuse_opt.h
|
||||||
doinclude winfsp_fuse.h
|
doinclude winfsp_fuse.h
|
||||||
|
|
||||||
cd ${B}/opt/cygfuse
|
cd ${B}/opt/cygfuse/fuse/build/$(ARCH)
|
||||||
dobin cygfuse-${VERSION}.dll
|
dobin cygfuse-${VERSION}.dll
|
||||||
dolib libfuse-${VERSION}.dll.a
|
dolib libfuse-${VERSION}.dll.a
|
||||||
dosym libfuse-${VERSION}.dll.a /usr/lib/libfuse.dll.a
|
dosym libfuse-${VERSION}.dll.a /usr/lib/libfuse.dll.a
|
Loading…
x
Reference in New Issue
Block a user