File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed
Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,15 @@ DYLIB_EXT = so
1515DYNAMIC_LIB := -shared -fPIC
1616CFLAGS := $(CFLAGS ) -lpthread -ldl
1717CXXFLAGS := $(CXXFLAGS ) -lcurl -lssl -lcrypto
18- PACKAGE := linux-package
18+
19+ ifneq ($(shell command -v rpm 2>/dev/null) ,)
20+ PACKAGE := rpm-package
21+ endif
22+ # Check for deb (apt/dpkg)
23+ ifneq ($(shell command -v dpkg 2>/dev/null) ,)
24+ PACKAGE := deb-package
25+ endif
26+
1927endif
2028
2129LIBFILE := $(LIBNAME ) .$(DYLIB_EXT )
@@ -51,10 +59,6 @@ pkg: sqlwrite-bin $(LIBFILE) $(SQLITE_LIB)
5159 pkgbuild --root pkg_root --identifier $(DOMAIN) --version 1.0 --install-location / sqlwrite-mac.pkg
5260endif
5361
54- # Packaging for Linux systems
55-
56- linux-package : deb-package rpm-package
57-
5862deb-package : sqlwrite-bin $(LIBFILE ) $(SQLITE_LIB )
5963 # Create the package directory structure
6064 mkdir -p pkg_root/usr/local/bin
@@ -107,6 +111,6 @@ rpm-package: sqlwrite-bin $(LIBFILE) $(SQLITE_LIB)
107111 cp rpmbuild/RPMS/*/sqlwrite-1.0-1.*.rpm sqlwrite-linux.rpm
108112
109113clean :
110- rm -rf sqlwrite-mac.pkg sqlwrite-linux.deb sqlwrite-bin $(LIBFILE ) $(SQLITE_LIB )
114+ rm -rf sqlwrite-mac.pkg sqlwrite-linux.deb sqlwrite-linux.rpm sqlwrite- bin $(LIBFILE ) $(SQLITE_LIB )
111115
112116
You can’t perform that action at this time.
0 commit comments