From 363cebf9542d94377c89fe0a076336f4417847ca Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 21 Jan 2026 17:11:17 +0300 Subject: [PATCH 1/3] use relative paths for install --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8b127b2..d2e13a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,9 +20,9 @@ add_executable(easy-switcher target_link_libraries(${PROJECT_NAME} ${LIBEVDEV_LIBRARIES}) -install(TARGETS easy-switcher RUNTIME DESTINATION /usr/bin) -install(FILES resources/easy-switcher.service DESTINATION /usr/lib/systemd/system) -install(FILES resources/easy-switcher.1 DESTINATION /usr/share/man/man1) +install(TARGETS easy-switcher RUNTIME DESTINATION bin) +install(FILES resources/easy-switcher.service DESTINATION lib/systemd/system) +install(FILES resources/easy-switcher.1 DESTINATION share/man/man1) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -E remove /usr/bin/easy-switcher From b9bf37e6daeb95caf57cb216bf297dc821dd3d76 Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 21 Jan 2026 17:52:08 +0300 Subject: [PATCH 2/3] initial move for dpkg-buildpackage --- {resources => debian}/changelog | 0 debian/compat | 1 + debian/control | 11 +++++++++++ {resources => debian}/copyright | 0 {resources => debian}/easy-switcher.service | 0 debian/rules | 4 ++++ resources/changelog.gz | Bin 374 -> 0 bytes resources/easy-switcher.1.gz | Bin 844 -> 0 bytes resources/postinst | 7 ------- resources/prerm | 7 ------- 10 files changed, 16 insertions(+), 14 deletions(-) rename {resources => debian}/changelog (100%) create mode 100644 debian/compat create mode 100644 debian/control rename {resources => debian}/copyright (100%) rename {resources => debian}/easy-switcher.service (100%) create mode 100755 debian/rules delete mode 100644 resources/changelog.gz delete mode 100644 resources/easy-switcher.1.gz delete mode 100644 resources/postinst delete mode 100644 resources/prerm diff --git a/resources/changelog b/debian/changelog similarity index 100% rename from resources/changelog rename to debian/changelog diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b1bd38b --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +13 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..13b4107 --- /dev/null +++ b/debian/control @@ -0,0 +1,11 @@ +Architecture: amd64 +Depends: libc6, libevdev2 +Description: Keyboard layout switcher for Linux + Easy Switcher is a keyboard layout switcher and input corrector for Linux. +Maintainer: freemind +Package: easy-switcher +Priority: optional +Section: utils +Version: 0.5 +Installed-Size: 526 + diff --git a/resources/copyright b/debian/copyright similarity index 100% rename from resources/copyright rename to debian/copyright diff --git a/resources/easy-switcher.service b/debian/easy-switcher.service similarity index 100% rename from resources/easy-switcher.service rename to debian/easy-switcher.service diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..2d33f6a --- /dev/null +++ b/debian/rules @@ -0,0 +1,4 @@ +#!/usr/bin/make -f + +%: + dh $@ diff --git a/resources/changelog.gz b/resources/changelog.gz deleted file mode 100644 index da7998be4e93e2078442cdfbafbd2d2aad26f1de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 374 zcmV-+0g3(}iwFP!000021ErHqYa1~ThVT9rFFB>PH^^S+(x#=MVCW(A;6l&Z)z~Yl zk7YDU*?-?j+!9k#yigDb&5TCRyrUsorl$P#(htPAHaE9#P*V}x1$vLlM@s$lA(Hbo zE*8LB>^v92=j9Sz^}#*c?wunCm#f}t_JcnNY=H~}M+aMjpwH=%xcHp#gC;%3&L=B+ zK1-mUE?ai6Rk91Ru{Q6_)56lU#w-@}w;tO|dVGl^=SPJj=FAvua>1wLv+uztHThFSq$Fi7=(kEM zm@RhHoj}bc&~`THSubojX7)0~xm-K;Dq#DEYkQe%^M70~&HvqM98}UW6`_b=r(6Z6 z=THW9_fv^Ly>Xi5%OhGfu#`#We Uh4lvaBfpOG3uznbzRCjt03k%Yga7~l diff --git a/resources/easy-switcher.1.gz b/resources/easy-switcher.1.gz deleted file mode 100644 index 50dda4bdce69d2558841c8d1ac5eef487dd1b195..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 844 zcmV-S1GD@eiwFP!000021C3O{ZreBzz4I#uMh`94Qfy;;XwfXzb<|iu5*w0?Zn4<| zO^s}#k|>arTlMQZq~tVmi()T^EOFkOdG8Iw#|hl?y5R?eLTNy5y1;yqRvb~YFk3^k zOg{zb$2eQ9qXgzKS2tcunxPmvXr)C9xwg$u-T?@%EI>-&HnpX#G7pv zZyp|ty|8ufXVW5L_fE<#t~ zDFm-Uw>3c%?!G-hrE+x5nxpy>_M`VwkWSf_Mo%CRFqy&xg5XSyY;}Huh!`O~yC7?e znv?n`EW7Xrgg!$MIZLR4aaphBv-A1+yzlZC6{7*BzI|CAfOOp}gS~WDB)3x#Pgq;? z4E=aUKVsRi8)+Ky2JDf1b#I_TW5~KekJaYkLwvhSmOc!tvG}qiG6Tkvb2)JP_J3Ky zwp{ZHNh?FGin7h|EgSk9ax#>%lq?g@B-$~ds=cgxW>xs)Kx>HC8R(B+rY(f%E3cXo zeP1Kw>&2Tt{#-n<4xtPP;2CE@s`v;$@eJ$bcP)gQek>3cs+aK z$&tEXTdgS5##!cHI6o^{meL@V<&^d{89};s#$p9W$}VB|MxI+JJ5S^5ujfA)_9Yje z3CXfM`f)S#D+Igv#<&ssJ)_WILpE5NYu`C-D{cnMqkoq7+q)?B!5gg`Q6?#S0jAB> z_*NM0N0>y+7x&5jZIxSzi}T}n|F*hc5MSSS9%qnd%WU_Hi%z3$b!}h4M$^YE7|ILbMdryw%RHksORZQ~y?0=WThvyCvDMQFOskXI}7k z6gwSY#bx<7_Iac|sQz-9zLj>}?&)T0l##SW-GGxu5iIZ04Rfna5qdd)H67xR({q1l Wxy#m@gl$SZF!mi)0c=K+1^@ulN~1CW diff --git a/resources/postinst b/resources/postinst deleted file mode 100644 index 7c7a7da..0000000 --- a/resources/postinst +++ /dev/null @@ -1,7 +0,0 @@ -# resources/postinst -#!/bin/sh -set -e -systemctl daemon-reload || true -systemctl enable easy-switcher.service || true -exit 0 - diff --git a/resources/prerm b/resources/prerm deleted file mode 100644 index 09afcea..0000000 --- a/resources/prerm +++ /dev/null @@ -1,7 +0,0 @@ -# resources/prerm -#!/bin/sh -set -e -systemctl stop easy-switcher.service || true -systemctl disable easy-switcher.service || true -exit 0 - From a8815d67bd9c208bd4ad3af5752715ea5a9b7291 Mon Sep 17 00:00:00 2001 From: kevin Date: Wed, 21 Jan 2026 18:40:29 +0300 Subject: [PATCH 3/3] moved debian logic to dpkg-buildpackage --- CMakeLists.txt | 2 -- README.md | 4 ++++ debian/control | 14 +++++++------- {resources => debian}/postrm | 4 +--- 4 files changed, 12 insertions(+), 12 deletions(-) rename {resources => debian}/postrm (74%) mode change 100644 => 100755 diff --git a/CMakeLists.txt b/CMakeLists.txt index d2e13a4..52e9975 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,12 +21,10 @@ add_executable(easy-switcher target_link_libraries(${PROJECT_NAME} ${LIBEVDEV_LIBRARIES}) install(TARGETS easy-switcher RUNTIME DESTINATION bin) -install(FILES resources/easy-switcher.service DESTINATION lib/systemd/system) install(FILES resources/easy-switcher.1 DESTINATION share/man/man1) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -E remove /usr/bin/easy-switcher COMMAND ${CMAKE_COMMAND} -E remove_directory /etc/easy-switcher - COMMAND ${CMAKE_COMMAND} -E remove /usr/lib/systemd/system/easy-switcher.service COMMAND ${CMAKE_COMMAND} -E remove /usr/share/man/man1/easy-switcher.1 ) diff --git a/README.md b/README.md index 8f374d1..bd03262 100644 --- a/README.md +++ b/README.md @@ -9,3 +9,7 @@ sudo make install sudo easy-switcher --configure sudo systemctl enable easy-switcher sudo systemctl start easy-switcher + +you can create a deb package using + +dpkg-buildpackage --no-sign --build=binary --post-clean diff --git a/debian/control b/debian/control index 13b4107..0ee0bec 100644 --- a/debian/control +++ b/debian/control @@ -1,11 +1,11 @@ +Source: easy-switcher +Section: utils +Priority: optional +Maintainer: freemind +Standards-Version: 0.5 + +Package: easy-switcher Architecture: amd64 Depends: libc6, libevdev2 Description: Keyboard layout switcher for Linux Easy Switcher is a keyboard layout switcher and input corrector for Linux. -Maintainer: freemind -Package: easy-switcher -Priority: optional -Section: utils -Version: 0.5 -Installed-Size: 526 - diff --git a/resources/postrm b/debian/postrm old mode 100644 new mode 100755 similarity index 74% rename from resources/postrm rename to debian/postrm index 7af87af..fdedceb --- a/resources/postrm +++ b/debian/postrm @@ -1,8 +1,6 @@ -# resources/postrm #!/bin/sh set -e +#DEBHELPER# if [ "$1" = "purge" ]; then rm -rf /etc/easy-switcher fi -exit 0 -