2020-03-10 16:04:27 +03:00
#!/usr/bin/make -f
# -*- makefile -*-
# Version
# VERSION := 1.7.5
# Directories
SOURCEDIR := ../src
LIBDIR := $( DESTDIR) /usr/lib/UDSClient
BINDIR := $( DESTDIR) /usr/bin
SBINDIR = $( DESTDIR) /usr/sbin
APPSDIR := $( DESTDIR) /usr/share/applications
PYC := $( shell find $( SOURCEDIR) -name '*.py[co]' )
CACHES := $( shell find $( SOURCEDIR) -name '__pycache__' )
clean :
rm -rf $( PYC) $( CACHES) $( DESTDIR)
install :
rm -rf $( DESTDIR)
mkdir -p $( LIBDIR)
#mkdir -p $(BINDIR)
#mkdir -p $(SBINDIR)
mkdir -p $( APPSDIR)
mkdir $( LIBDIR) /uds
# Cleans up .pyc and cache folders
rm -f $( PYC) $( CACHES)
cp $( SOURCEDIR) /uds/*.py $( LIBDIR) /uds
cp $( SOURCEDIR) /UDS*.py $( LIBDIR)
# URL Catchers elements for gnome/kde
cp desktop/UDSClient.desktop $( APPSDIR)
chmod 755 $( LIBDIR) /UDSClient.py
i f e q ( $( DISTRO ) , t a r g z )
cp installer.sh $( DESTDIR) /install.sh
2020-06-24 04:41:48 +03:00
tar czvf ../udsclient3-$( VERSION) .tar.gz -C $( DESTDIR) .
2020-03-10 16:04:27 +03:00
e n d i f
2020-06-24 04:01:04 +03:00
i f e q ( $( DISTRO ) , r h )
e n d i f
2020-03-10 16:04:27 +03:00
uninstall :
rm -rf $( LIBDIR)
# rm -f $(BINDIR)/udsclient
# rm -rf $(CFGDIR)
2021-06-10 18:02:11 +03:00
build-appimage :
cat udsclient-appimage.recipe | sed -e s/"version: 0.0.0" /" version: $( VERSION) " /g > appimage.recipe
appimage-builder --recipe appimage.recipe
# Now create dist and move appimage
rm -rf $( DESTDIR)
mkdir -p $( DESTDIR)
cp UDSClient-$( VERSION) -x86_64.AppImage $( DESTDIR)
# Generate the .desktop fixed for new path
cat desktop/UDSClient.desktop | sed -e s/".usr.lib.UDSClient.UDSClient.py" /" \/usr\/bin\/UDSClient- $( VERSION) -x86_64.AppImage " /g > $( DESTDIR) /UDSClient.desktop
# And also, generater installer
cat installer-appimage-template.sh | sed -e s/"0.0.0" /" $( VERSION) " /g > $( DESTDIR) /installer.sh
chmod 755 $( DESTDIR) /installer.sh
tar czvf ../udsclient3-portable-$( VERSION) .tar.gz -C $( DESTDIR) .
# Now