-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
248 additions
and
309 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
wslu (1.8-0) stable; urgency=low | ||
|
||
* less dependent on lsb-release/hostname/uptime/uname. | ||
* add support for WLinux. | ||
* install and build scripts update. | ||
|
||
-- Patrick Wu <wotingwu@live.com> Sun, 23 Sep 2018 12:00:00 +0800 | ||
|
||
wslu (1.7-0) stable; urgency=low | ||
|
||
* wslview out of experimental stage. | ||
* Fix issues when running on top of Powershell Core 6. | ||
* install scripts further update. | ||
|
||
-- Patrick Wu <wotingwu@live.com> Sun, 02 Sep 2018 12:00:00 +0800 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Source: wslu | ||
Section: utils | ||
Maintainer: Patrick Wu <wotingwu@live.com> | ||
Standards-Version: VERSIONPLACEHOLDER-0~DATEPLACEHOLDER | ||
Priority: optional | ||
|
||
Package: wslu | ||
Architecture: arm64 amd64 | ||
Depends: bc, wget | ||
Recommends: git | ||
Description: A collection of utilities for Windows 10 Linux Subsystem | ||
This is a collection of utilities for Windows 10 Linux Subsystem, such as enabling sound in WSL or creating your favorite linux app shortcuts on Windows 10 Desktop. Requires Windows 10 Creators Update and higher. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ | ||
Upstream-Name: wslu | ||
Upstream-Contact: Patrick Wu <wotingwu@live.com> | ||
Source: https://github.com/wslutilities/wslu | ||
|
||
Files: * | ||
Copyright: 2017-2018 Patrick Wu <wotingwu@live.com> | ||
License: GPL-3+ | ||
|
||
License: GPL-3+ | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
|
||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
|
||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
src/wsl* /usr/bin | ||
src/etc/* usr/share/wslu | ||
src/mime/* usr/lib/mime/packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/wslview 1 | ||
update-alternatives --install /usr/bin/www-browser www-browser /usr/bin/wslview 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
update-alternatives --remove x-www-browser /usr/bin/wslview | ||
update-alternatives --remove www-browser /usr/bin/wslview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/make -f | ||
# See debhelper(7) (uncomment to enable) | ||
# output every command that modifies files on the build system. | ||
#DH_VERBOSE = 1 | ||
|
||
# see FEATURE AREAS in dpkg-buildflags(1) | ||
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all | ||
|
||
# see ENVIRONMENT in dpkg-buildflags(1) | ||
# package maintainers to append CFLAGS | ||
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic | ||
# package maintainers to append LDFLAGS | ||
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed | ||
|
||
%: | ||
dh $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,40 @@ | ||
#!/usr/bin/env bash | ||
BUILD_DIR=`mktemp --tmpdir --directory wslu-build-debian.XXXX` | ||
BUILD_DIR_WSLVIEW=`mktemp --tmpdir --directory wslview-build-debian.XXXX` | ||
BUILD_VER=`grep 'version=' ../src/wslu-header | cut -d'=' -f 2 | xargs` | ||
DATE=`date +%Y%m%d%H%M%S` | ||
CURRENT_DIR=`pwd` | ||
|
||
mkdir $BUILD_DIR/{DEBIAN/,usr/,usr/bin/,usr/share/,usr/share/wslu/,usr/lib,usr/lib/mime,/usr/lib/mime/packages/} | ||
|
||
touch $BUILD_DIR/DEBIAN/{postinst,prerm,control} | ||
|
||
chmod 755 $BUILD_DIR/DEBIAN/{postinst,prerm} | ||
|
||
cat <<EOF >>$BUILD_DIR/DEBIAN/postinst | ||
#!/usr/bin/env bash | ||
update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/wslview 1 | ||
update-alternatives --install /usr/bin/www-browser www-browser /usr/bin/wslview 1 | ||
EOF | ||
|
||
cat <<EOF >>$BUILD_DIR/DEBIAN/prerm | ||
#!/usr/bin/env bash | ||
update-alternatives --remove x-www-browser /usr/bin/wslview | ||
update-alternatives --remove www-browser /usr/bin/wslview | ||
EOF | ||
|
||
cat <<EOF >>$BUILD_DIR/DEBIAN/control | ||
Package: wslu | ||
Architecture: all | ||
Maintainer: Patrick Wu <wotingwu@live.com> | ||
Depends: bc, wget, unzip, lsb-release | ||
Recommends: git | ||
Suggests: build-essential | ||
Priority: optional | ||
Version: $BUILD_VER-1 | ||
Description: A collection of utilities for Windows 10 Linux Subsystem | ||
This is a collection of utilities for Windows 10 Linux Subsystem, such as enabling sound in WSL or creating your favorite linux app shortcuts on Windows 10 Desktop. Requires Windows 10 Creators Update and higher. | ||
EOF | ||
|
||
cp ../out/wsl* $BUILD_DIR/usr/bin/ | ||
cp ../src/etc/* $BUILD_DIR/usr/share/wslu/ | ||
cp ../src/mime/* $BUILD_DIR/usr/lib/mime/packages/ | ||
|
||
cd $BUILD_DIR | ||
find . -type f ! -regex '.*.hg.*' ! -regex '.*?debian-binary.*' ! -regex '.*?DEBIAN.*' -printf '%P ' | xargs md5sum > DEBIAN/md5sums | ||
|
||
find $BUILD_DIR -type d -exec chmod 0755 {} \; | ||
find $BUILD_DIR/usr/ -type f -exec chmod 0555 {} \; | ||
find $BUILD_DIR/usr/lib/mime/packages/ -type f -exec chmod 644 {} \; | ||
|
||
[ -d $CURRENT_DIR/../target ] || mkdir $CURRENT_DIR/../target | ||
cd $CURRENT_DIR/../target/ | ||
|
||
sudo dpkg -b $BUILD_DIR/ wslu-${BUILD_VER}.deb | ||
|
||
# Creating folders | ||
mkdir -p $BUILD_DIR/wslu-$BUILD_VER/{debian,debian/source,src,src/etc,src/mime} | ||
|
||
# Build wslu | ||
cd $CURRENT_DIR/../ | ||
make | ||
|
||
# copy files to build folder | ||
cp out/* $BUILD_DIR/wslu-$BUILD_VER/src/ | ||
cp src/etc/* $BUILD_DIR/wslu-$BUILD_VER/src/etc/ | ||
cp src/mime/* $BUILD_DIR/wslu-$BUILD_VER/src/mime/ | ||
cp extras/debian/* $BUILD_DIR/wslu-$BUILD_VER/debian | ||
|
||
# modifying the files | ||
sed -i s/VERSIONPLACEHOLDER/$BUILD_VER/g $BUILD_DIR/wslu-$BUILD_VER/debian/control | ||
sed -i s/DATEPLACEHOLDER/$DATE/g $BUILD_DIR/wslu-$BUILD_VER/debian/control | ||
chmod 755 $BUILD_DIR/wslu-$BUILD_VER/debian/{postinst,prerm,rules} | ||
|
||
# Build packages | ||
cd $BUILD_DIR/wslu-$BUILD_VER/ | ||
dpkg-buildpackage -rsudo -us -uc | ||
|
||
# Move built packages | ||
[ -d $CURRENT_DIR/../target/debian ] || mkdir -p $CURRENT_DIR/../target/debian | ||
cd $CURRENT_DIR/../target/debian | ||
cp -r $BUILD_DIR/*.dsc . | ||
cp -r $BUILD_DIR/*.deb . | ||
cp -r $BUILD_DIR/*.tar.gz . | ||
cp -r $BUILD_DIR/*.buildinfo . | ||
cp -r $BUILD_DIR/*.changes . | ||
|
||
# CLeanup everything | ||
rm -rf $BUILD_DIR | ||
cd $CURRENT_DIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
6371c82
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All very nice improvements. Thank you.