-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add recipe for stxtyper v1.0.25 #51792
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,11 @@ | ||||||||||||||||||||||||||||||||||||
#!/bin/bash | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
export INCLUDES="-I${PREFIX}/include" | ||||||||||||||||||||||||||||||||||||
export LIBPATH="-L${PREFIX}/lib" | ||||||||||||||||||||||||||||||||||||
export CXXFLAGS="${CXXFLAGS} -O3" | ||||||||||||||||||||||||||||||||||||
export CPPFLAGS="${CPPFLAGS} -O3 -I${PREFIX}/include" | ||||||||||||||||||||||||||||||||||||
export LDFLAGS="${LDFLAGS} -L${PREFIX}/lib" | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
make CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" CPPFLAGS="${CPPFLAGS}" -j"${CPU_COUNT}" | ||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
make install PREFIX="${PREFIX}" | ||||||||||||||||||||||||||||||||||||
Comment on lines
+9
to
+11
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add error checking and ensure proper installation. The build and install commands should include error checking and use DESTDIR for staged installations. Apply these improvements: -make CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" CPPFLAGS="${CPPFLAGS}" -j"${CPU_COUNT}"
+# Ensure CPU_COUNT is set
+export CPU_COUNT=${CPU_COUNT:-1}
+
+# Build with error checking
+if ! make CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" CPPFLAGS="${CPPFLAGS}" -j"${CPU_COUNT}"; then
+ echo "Build failed"
+ exit 1
+fi
-make install PREFIX="${PREFIX}"
+# Install with DESTDIR for proper staging
+if ! make install DESTDIR="${PREFIX}" PREFIX=""; then
+ echo "Installation failed"
+ exit 1
+fi 📝 Committable suggestion
Suggested change
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{% set name = "stxtyper" %} | ||
{% set version = "1.0.25" %} | ||
{% set sha256 = "adc734340c6a10f1bfc34ca637197e93e1515d0231bd023b33ce4c07aab9578e" %} | ||
|
||
package: | ||
name: {{ name|lower }} | ||
version: {{ version }} | ||
|
||
source: | ||
url: https://github.com/ncbi/stxtyper/archive/refs/tags/v{{ version }}.tar.gz | ||
sha256: {{ sha256 }} | ||
|
||
build: | ||
number: 0 | ||
run_exports: | ||
- {{ pin_subpackage('stxtyper', max_pin='x') }} | ||
|
||
requirements: | ||
build: | ||
- make | ||
- {{ compiler('cxx') }} | ||
host: | ||
- zlib | ||
run: | ||
- blast | ||
|
||
test: | ||
commands: | ||
- "stxtyper -h" | ||
|
||
about: | ||
home: https://github.com/ncbi/stxtyper | ||
license: Public Domain | ||
license_file: LICENSE | ||
summary: 'Accurately type both known and unknown Shiga toxin operons from assembled genomic sequence.' | ||
dev_url: https://github.com/ncbi/stxtyper |
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.
🛠️ Refactor suggestion
Consider more robust compiler flag handling.
While the environment setup is generally correct, there are a few suggestions for improvement:
Here's a more robust approach:
📝 Committable suggestion