Merge branch 'master' of github.com:truatpasteurdotfr/barrier
This commit is contained in:
commit
94cf6944de
|
@ -0,0 +1,29 @@
|
|||
#!/bin/sh
|
||||
cd "$(dirname $0)" || exit 1
|
||||
# some environments have cmake v2 as 'cmake' and v3 as 'cmake3'
|
||||
# check for cmake3 first then fallback to just cmake
|
||||
B_CMAKE=`type cmake3 2>/dev/null`
|
||||
if [ $? -eq 0 ]; then
|
||||
B_CMAKE=`echo $B_CMAKE | cut -d' ' -f3`
|
||||
else
|
||||
B_CMAKE=cmake
|
||||
fi
|
||||
# default build configuration
|
||||
B_BUILD_TYPE=${B_BUILD_TYPE:-Debug}
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
# OSX needs a lot of extra help, poor thing
|
||||
# run the osx_environment.sh script to fix paths
|
||||
. ./osx_environment.sh
|
||||
B_CMAKE_FLAGS="-DCMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 $B_CMAKE_FLAGS"
|
||||
fi
|
||||
# allow local customizations to build environment
|
||||
[ -r ./build_env.sh ] && . ./build_env.sh
|
||||
B_CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=$B_BUILD_TYPE $B_CMAKE_FLAGS"
|
||||
rm -rf build
|
||||
( mkdir build || exit 1
|
||||
cd build || exit 1
|
||||
echo Starting Barrier $B_BUILD_TYPE build...
|
||||
$B_CMAKE $B_CMAKE_FLAGS .. || exit 1
|
||||
[ -f rpm/barrier.spec ] && [ -f rpm/build_installer.sh ] ) && \
|
||||
build/rpm/build_installer.sh &&
|
||||
rpmbuild -ta ../Barrier*.tar.gz
|
|
@ -4,7 +4,8 @@ Version: @BARRIER_VERSION_MAJOR@.@BARRIER_VERSION_MINOR@.@BARRIER_VERSION_PATCH@
|
|||
Summary: Keyboard and mouse sharing solution
|
||||
Group: Applications/Productivity
|
||||
URL: https://github.com/debauchee/barrier/
|
||||
Source: https://github.com/debauchee/barrier/archive/v@BARRIER_VERSION@.tar.gz
|
||||
Source: Barrier-@BARRIER_VERSION@.tar.gz
|
||||
#Source: https://github.com/debauchee/barrier/archive/v@BARRIER_VERSION@.tar.gz
|
||||
# workaround the git versionning and set to Release instead of the default Debug
|
||||
#Source1: build_env.sh
|
||||
Vendor: Debauchee ### FIXME ###
|
||||
|
@ -31,7 +32,8 @@ Barrier allows you to share one mouse and keyboard between multiple computers.
|
|||
Work seamlessly across Windows, macOS and Linux.
|
||||
|
||||
%prep
|
||||
%setup -n %{name}-@BARRIER_VERSION@
|
||||
%setup -n %{name}
|
||||
#%setup -n %{name}-@BARRIER_VERSION@
|
||||
|
||||
%build
|
||||
cp dist/rpm/build_env.sh .
|
||||
|
@ -50,14 +52,15 @@ scl enable devtoolset-3 ./clean_build.sh
|
|||
%{__mkdir} -p %{buildroot}%{_bindir} %{buildroot}%{_datarootdir}/applications %{buildroot}%{_datarootdir}/icons/hicolor/scalable/apps
|
||||
%{__install} -t %{buildroot}%{_datarootdir}/applications res/barrier.desktop
|
||||
%{__install} -t %{buildroot}%{_datarootdir}/icons/hicolor/scalable/apps res/barrier.svg
|
||||
%{__install} -t %{buildroot}%{_bindir} build/bin/{barrier,barrierc,barriers,barrierd,syntool}
|
||||
%{__install} -t %{buildroot}%{_bindir} build/bin/{barrier,barrierc,barriers,syntool}
|
||||
#%{__install} -t %{buildroot}%{_bindir} build/bin/{barrier,barrierc,barriers,barrierd,syntool}
|
||||
|
||||
%files
|
||||
%defattr(755,root,root,-)
|
||||
%{_bindir}/barrier
|
||||
%{_bindir}/barrierc
|
||||
%{_bindir}/barriers
|
||||
%{_bindir}/barrierd
|
||||
#%{_bindir}/barrierd
|
||||
%{_bindir}/syntool
|
||||
%attr(644,-,-) %{_datarootdir}/applications/barrier.desktop
|
||||
%attr(644,-,-) %{_datarootdir}/icons/hicolor/scalable/apps/barrier.svg
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
|
||||
# change this to rename the installer package
|
||||
B_TARGZ="Barrier-@BARRIER_VERSION@.tar.gz"
|
||||
|
||||
# sanity check so we don't distribute packages full of debug symbols
|
||||
if [ "@CMAKE_BUILD_TYPE@" != "Release" ]; then
|
||||
echo Will only build installers for Release builds
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cd @CMAKE_CURRENT_SOURCE_DIR@/build/rpm || exit 1
|
||||
|
||||
B_SPECFILE=@CMAKE_CURRENT_SOURCE_DIR@/barrier.spec
|
||||
if [ ! -f $B_SPECFILE ]; then
|
||||
echo Missing spec file: $B_SPECFILE
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# remove any old copies so there's no confusion about whether this
|
||||
# process completes successfully or not
|
||||
[ -f $B_TARGZ ] && rm -f $B_TARGZ
|
||||
|
||||
cp build_env.sh $B_SPECFILE @CMAKE_CURRENT_SOURCE_DIR@ &&
|
||||
(cd @CMAKE_CURRENT_SOURCE_DIR@/.. && tar -czvf @CMAKE_CURRENT_SOURCE_DIR@/../$B_TARGZ \
|
||||
barrier/barrier.spec \
|
||||
barrier/Build.properties \
|
||||
barrier/CMakeLists.txt \
|
||||
barrier/ChangeLog \
|
||||
barrier/LICENSE \
|
||||
barrier/README.md \
|
||||
barrier/build_env.sh \
|
||||
barrier/build_installer.bat \
|
||||
barrier/clean_build.bat \
|
||||
barrier/clean_build.sh \
|
||||
barrier/cmake \
|
||||
barrier/debian \
|
||||
barrier/dist \
|
||||
barrier/doc \
|
||||
barrier/ext \
|
||||
barrier/osx_environment.sh \
|
||||
barrier/res \
|
||||
barrier/src \
|
||||
|
||||
|
||||
)
|
||||
|
||||
# copy all executables
|
||||
#cp @CMAKE_RUNTIME_OUTPUT_DIRECTORY@/* . || exit 1
|
||||
|
||||
# copy the qt platform plugin
|
||||
# TODO: this is hacky and will probably break if there is more than one qt
|
||||
# version installed. need a better way to find this library
|
||||
|
||||
echo "Installer created successfully"
|
Loading…
Reference in New Issue