mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-07 12:32:11 -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
|
47
opt/cygfuse/Makefile
Normal file → Executable file
47
opt/cygfuse/Makefile
Normal file → Executable file
@ -1,30 +1,33 @@
|
||||
Version = $(shell sed -n '/^VERSION=/s/VERSION=\(.*\)/\1/p' fuse.cygport)
|
||||
#Debug = -g
|
||||
Arch = $(shell uname -m)
|
||||
Build = build
|
||||
|
||||
cygfuse-$(Version).dll libfuse-$(Version).dll.a fuse.pc: cygfuse.c fuse.pc.in
|
||||
gcc $(Debug) -shared -o cygfuse-$(Version).dll -Wl,--out-implib=libfuse-$(Version).dll.a -I../../inc/fuse cygfuse.c
|
||||
[ -n "$(Debug)" ] || strip cygfuse-$(Version).dll
|
||||
sed "s/@Version@/$(Version)/g" fuse.pc.in > fuse.pc
|
||||
|
||||
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: usage
|
||||
usage:
|
||||
@echo "make cygport|dist" 1>&2
|
||||
@exit 2
|
||||
|
||||
.PHONY: cygport
|
||||
cygport:
|
||||
git clean -dfx
|
||||
(\
|
||||
cd `git rev-parse --show-toplevel` &&\
|
||||
Stash=`git stash create` &&\
|
||||
git archive --prefix=winfsp-work/ --format=tar.gz $${Stash:-HEAD}\
|
||||
> opt/cygfuse/winfsp-work.tar.gz\
|
||||
)
|
||||
CYGPORT_SRC_URI=winfsp-work.tar.gz CYGPORT_SRC_DIR=winfsp-work cygport fuse.cygport download prep compile install package
|
||||
rm -rf $(Build)
|
||||
mkdir -p $(Build)
|
||||
( \
|
||||
cd `git rev-parse --show-toplevel` && \
|
||||
Stash=`git stash create` && \
|
||||
git archive --prefix=winfsp-work-$(Arch)/ --format=tar.gz $${Stash:-HEAD} \
|
||||
) > $(Build)/winfsp-work-$(Arch).tar.gz
|
||||
cp fuse/fuse.cygport $(Build)/fuse.cygport
|
||||
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
|
||||
case $(shell uname -m) in \
|
||||
x86_64)\
|
||||
case $(Arch) in \
|
||||
x86_64) \
|
||||
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 && \
|
||||
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
|
||||
|
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
|
||||
*/
|
@ -1,6 +1,6 @@
|
||||
NAME="fuse"
|
||||
VERSION=2.8
|
||||
RELEASE=8
|
||||
RELEASE=9
|
||||
CATEGORY="Utils"
|
||||
SUMMARY="WinFsp-FUSE compatibility layer"
|
||||
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()
|
||||
{
|
||||
lndirs
|
||||
cd ${B}/opt/cygfuse
|
||||
cd ${B}/opt/cygfuse/fuse
|
||||
make
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ src_install()
|
||||
doinclude fuse_opt.h
|
||||
doinclude winfsp_fuse.h
|
||||
|
||||
cd ${B}/opt/cygfuse
|
||||
cd ${B}/opt/cygfuse/fuse/build/$(ARCH)
|
||||
dobin cygfuse-${VERSION}.dll
|
||||
dolib libfuse-${VERSION}.dll.a
|
||||
dosym libfuse-${VERSION}.dll.a /usr/lib/libfuse.dll.a
|
Loading…
x
Reference in New Issue
Block a user